New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assembly numbers to major.0.0.0, instead of to major.minor.patch.0. #543

dotnetjunkie opened this Issue Apr 29, 2018 · 0 comments


1 participant
Copy link

dotnetjunkie commented Apr 29, 2018

Whenever a new release of Simple Injector is created, and published to NuGet, the newly built assembly will have a new version number, e.g. This has a few unfortunate consequences.

Any time the Simple Injector core library is updated (which happens more often than the integration libraries), new versions of those integration libraries are published as well. The reason for doing so, is because Simple Injector is strongly signed, and not recompiling an integration library, causes it to refer to an older version of the core library. This again results in an increase in the number of binding redirects a user has to make in its application.

Although NuGet should typically fix binding redirects, this often goes wrong, and even if it does, it easily leads to an explosion of binding redirects required for the application to run.

For this reason, we roll out new versions of depending libraries as well, even though no code change has been made.

Although this works pretty well, it is quite confusing for users to see new versions appear, while no changes have been made. It also causes the list of NuGet packages to explode, while most of the time, no changes were made to a particular library. They also have to do more work to update packages that need no updating, and it might cause more merge conflicts in their packages.config file.

To mitigate this, assembly versioning should be restricted to major version numbers only. This means that every Simple Injector assembly for v5 will get a assembly number. At that point, versioning is lifted to NuGet that will still contain the proper version number. Whenever a new version of an integration library is released, that needs to depend on the latest version of the core library, this dependency can be added in the NuGet package. NuGet allows dependencies to be annotated with a 'minimum version'.

This is a strategy that quite effectively is used by many other OSS libraries as well.

@dotnetjunkie dotnetjunkie added this to the v5.0 milestone Apr 29, 2018

@dotnetjunkie dotnetjunkie changed the title Fix assembly numbers to the major release, instead of to major.minor.patch. Fix assembly numbers to major.0.0.0, instead of to major.minor.patch.0. Apr 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment