TLDR: Where is dotnet pack
pulling the version information when it creates the nuget package for an assembly?
I have a library, that I had transitioned fr
Better yet, specify /p:Version=$(Build.BuildNumber)
(TFS/VSTS) on the dotnet pack command and it will build it with the specified version in the nuget package.
Example (non TFS specific):
dotnet pack .\src\example\example.csproj -o c:\published\example -c Release /p:Version=1.2.3
Example (TFS specific) <- we use this for our TFS 2017 packing using a powershell script step.
dotnet pack $(Build.SourcesDirectory)\src\example\example.csproj -o $(Build.ArtifactStagingDirectory)\Pack -c Release /p:Version=$(Build.BuildNumber)
Note: It does not update package reference versions.