Replies: 1 comment
-
No, this is wrong. You should reference the same version of package, usually the latest one. Out-of-band NuGet packages are meant to be used with different versions of framework. The version number means the timeline of the package produced, but they are not tied to the framework version.
Use the latest version that provides support on the framework, in this case you should use
You are probably messed up with package version and supported framework version. The package version number itself isn't functionally meaningful. |
Beta Was this translation helpful? Give feedback.
-
Question 1
I'm developing a component. This component depends on the
Microsoft.Extensions.DependencyInjection.Abstractions
package. My target framework might be.NET Framework 4.8
,.NET 6.0
, and.NET 8.0
. Should I reference different versions ofMicrosoft.Extensions.DependencyInjection.Abstractions
for each target framework?For example:
Question 2
If I'm developing a component targeting only the .NET 6.0 framework, should I reference
Microsoft.Extensions.DependencyInjection.Abstractions
version6.0.0
or8.0.0
? I can find version8.0.0
in NuGet Package Manager.Choosing SDK versions and NuGet package versions is really confusing and troublesome for me.
Beta Was this translation helpful? Give feedback.
All reactions