Recently in our firm we decided to upload our company developed library files into a private NuGet server. Everything seemed to be fine before version numbers started to grow. The solutions that used our NuGet libraries stopped building properly, and we believe that the versioning is the problem.
Here is the scenario:

This is a diagram with the references of the packages (as you can see they have references among themselves)
1) In a solution S you install from the private NuGet server for example libraries A, B, E all with version number 1.0.0.0.
2) You make a change in A and increase the version number of it to 1.0.0.1.
3) You update the library A from the NuGet Package Manager in solution S to version 1.0.0.1
4) You end up with two versions of A one for S (1.0.0.1) and one B, E (1.0.0.0)
5) In solution S, Visual Studio (Tested on 2012, 2015 Professional) shows that the reference cannot be found and wants to reinstall the package. When you do that it builds, but when you commit the next person's build fails...
Some (ugly?) work around would be not to reference the packages as NuGet, but to embed the references in the dlls. Or to go in all the packages that reference A, update it, change its version and then update S, witch sounds like awful lot of work..
And should't it just work since when you reference a NuGet package you don't specify specific version but >= version?
Or are we doing it all wrong?
Thank you!
In your situation, there are two ways to resolve the issue when the dependent package A upgrade to version 1.0.0.1.
<dependentAssembly>
<assemblyIdentity name="someAssembly"
publicKeyToken="32ab4ba45e0a69a1"
culture="en-us" />
<bindingRedirect oldVersion="7.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependencies>
<dependency id="Package A" version="[1.0.0.0, higher version)" />
</dependencies>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With