Skip to content

Questions on Versioning and Dependencies for .NET Components: SDK vs. NuGet Package Versions #110265

Answered by huoyaoyuan
noSet asked this question in Q&A
Discussion options

You must be logged in to vote

Should I reference different versions of Microsoft.Extensions.DependencyInjection.Abstractions for each target framework?

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.
Rarely, these packages may contain breaking change between versions. Using the same package version helps you ensuring the same feature and behavior.

If I'm developing a component targeting only the .NET 6.0 framework, should I reference Microsoft.Extensions.DependencyInjection.Abs…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by noSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants