Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix assembly numbers to major.0.0.0, instead of to major.minor.patch.0. #543
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. 22.214.171.124. 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 126.96.36.199 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.