This is on SDK 3.1.301. I haven't tested it on the 5.0 previews. I have a solution with two .net core class libraries, LibA and LibB. LibB depends on LibA. Each of the csproj sets the package version for their corresponding library (LibA 2.0.0, LibB 1.0.0).
When I run dotnet pack on LibB, the nupkg correctly lists LibA 2.0.0 as a dependecy. However if I run dotnet pack /p:PackageVersion=1.0.0-ci-20200702.1 on LibB the nupkg lists LibA 1.0.0-ci-20200702.1 as a dependency. The pack tool seems to be overriding the package version of all my project dependencies, not just the project I am building. Is this the intended behavior? I would think that the package version should only apply to the package I am building. Is there a way to tell dotnet pack to only override the version of the csproj on which it is being invoked and not its project dependencies?
|