I am getting the following error when setting the version using
dotnet pack instead on
dotnet build when 'overriding' the package
System.IO.FileLoadException: Could not load file or assembly 'My.Package, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'My.Package, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null'
Let's say I have the following 'dependecy graph'
When I build / pack as follows, it works
dotnet build MySolution.sln --version-suffix 188.8.131.52 -c Release dotnet pack My.Package/My.Package.csproj --no-build /p:Version=$VERSION=184.108.40.206 -c Release
However (as I am using docker) I would like to avoid putting the version at build time and rather only at pack time
dotnet build MySolution.sln -c Release dotnet pack My.Package/My.Package.csproj --no-build /p:Version=$VERSION=220.127.116.11
This also works, as long as I do not have to 'override' the package version in the dependency graph.
User contributions licensed under CC BY-SA 3.0