Why does NuGet allow versions differently depending on where you start?

The library that I am packaging as a NuGet package uses await / async, so I need to add a dependency to Microsoft.Bcl.Async. But Microsoft.Bcl.Async has dependencies on Microsoft.Bcl and Microsoft.Bcl.Build. What happens in the test project, I get different versions of these packages from NuGet.org depending on the installation order.

If I install Microsoft.Bcl.Async, then NuGet installs the following packages:

package id="Microsoft.Bcl.Build" version="1.0.4" 
package id="Microsoft.Bcl" version="1.0.19"  
package id="Microsoft.Bcl.Async" version="1.0.165" 

Then my test project does not compile.

If I first installed Microsoft.Bcl, NuGet will install the following:

package id="Microsoft.Bcl.Build" version="1.0.10" 
package id="Microsoft.Bcl" version="1.1.6" 

Then I can install Microsoft.Bcl.Async:

package id="Microsoft.Bcl.Async" version="1.0.165" 

The test project does not compile.

But if I install all three BCL projects manually one by one, I get the following:

package id="Microsoft.Bcl.Build" version="1.0.13" 
package id="Microsoft.Bcl" version="1.1.6" 
package id="Microsoft.Bcl.Async" version="1.0.165" 

!

, , , NuGet, NuGet ? , NuGet : Microsoft.Bcl.Async 1.0.165 Microsoft.Bcl 1.0.19 , NuGet 1.0.19. Microsoft.Bcl 1.0.19 Microsoft.Bcl.Build 1.0.4 , NuGet - 1.0.4. (, -, ).

, ?

+3
1

NuGet ?

. NuGet / . , , (, , ), .

, ?

, version dependency nuspec.

+3

All Articles