dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.35k stars 9.99k forks source link

Dll versions not up to date #18673

Closed dgxhubbard closed 4 years ago

dgxhubbard commented 4 years ago

I created a worker service using Visual Studio 2019 16.4.2. The project was created and ran so all was well. The project used Micosoft.Extensions.Hosting version 3.1 and has dependencies on:

Microsoft.Extensions.DependencyInjection.Abstractions 3.1 Microsoft.Extensions.Hosting.Abstractions 3.1

Microsoft.AspNetCore 2.2.0 uses

Microsoft.Extensions.DependencyInjection.Abstractions v 3.1 Microsoft.Extensions.Hosting.Abstractions v 2.2.0

So that means I cannot use a worker service as a windows service AspNetCore uses an older version and worker service requires a later version of Microsoft.Extensions.Hosting.Abstractions.

I wanted to ask if the lastest version of AspNetCore could use the latest version of Microsoft.Extensions.XXX. Because asp.net core using one version worker service using another has forced me to go backwards and use ServiceBase.

Even with this I am having problems because a third party dll we use uses Microsoft.Extensions.DependencyInjection.Abstractions v 3.1.1 and AspNetCore uses Microsoft.Extensions.DependencyInjection.Abstractions v 3.1.0.

This is create a dll version nightmare like the early days of windows so is there a way for the versions of Microsoft.Extensions.XXX to be made up to date.

Also I have read that asp.net core 3.1 was released is that true, and is AspNetCore 2.2.0 version 2 or version 3?

Tratcher commented 4 years ago

The Microsoft.AspNetCore package has been replaced by a new TargetFramework and FrameworkReference, that's why you don't see a 3.0 version. https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.1&tabs=visual-studio#remove-obsolete-package-references

Microsoft.Extensions.DependencyInjection.Abstractions 3.1.0 vs 3.1.1 shouldn't be a significant issue, everything should roll forwards to the latest patch version. What errors do you get?

dgxhubbard commented 4 years ago

This is not an old project, it is brand new so we don't need to remove old versions.

I have no idea what you mean by "The Microsoft.AspNetCore package has been replaced by a new TargetFramework and FrameworkReference, that's why you don't see a 3.0 version."

Is Microsoft.AspNetCore version 2.2.0 part of asp.net core version 3.x.

When I run as a service, it wanted version 3.1 of Microsoft.Extensions.Hosting.Abstractions but that version had been overwritten by version 2.2.0

Tratcher commented 4 years ago

Is Microsoft.AspNetCore version 2.2.0 part of asp.net core version 3.x.

No, the Microsoft.AspNetCore package doesn't exist anymore in 3.x. Why do you have a package reference to Microsoft.AspNetCore in a new project?

dgxhubbard commented 4 years ago

We are using a third party package that uses it.

analogrelay commented 4 years ago

Microsoft.AspNetCore 2.2.0 uses

Microsoft.Extensions.DependencyInjection.Abstractions v 3.1

@dgxhubbard Where are you seeing this? The nuget package graph shows only 2.2 dependencies for Microsoft.AspNetCore. Be aware that if you're looking at your .deps.json or the transitive package graph in VS it will show the highest versions of packages if two packages request different versions.

We are using a third party package that uses it.

If this is the case, you need to either upgrade the package to a version that uses 3.1 or stay on 2.2.

ghost commented 4 years ago

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!