Skip to content

Why is not the version of a NuGet published library enforced to be the same as the version in the assembly? #11347

Answered by zivkan
TomasJohansson asked this question in Q&A
Discussion options

You must be logged in to vote

Perhaps we can turn the question around and ask why should NuGet enforce the assembly version to be the same as the package version? What problem would it solve?

As for reasons why NuGet shouldn't enforce it, I can think of a few possibilities:

Some people create packages of other people's code. If they find an issue with their package and want to create a new package with the same assembly, how could they do that if they're limited to using the 3rd party assembly version as the package version?

Some package authors, Newtonsoft.Json is the most popular, intentionally use the same assembly version across multiple package versions. For example, all 13.0.x packages use assembly version 13.0.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TomasJohansson
Comment options

Answer selected by TomasJohansson
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