Append Build ID to nuget version specified in .csproj
Append Build ID to nuget version specified in .csproj In this video from MSDN (https://channel9.msdn.com/Events/Build/2018/THR5057) at the 3:34 second mark, the presenter shows how to append the Build ID to a nuget's version. In the MSBuild arguments, he specifies: /t:pack /p:PackageVersion=1.0.$(Build.BuildId) So, when the project is built by VSTS, the nuget assembly's revision number is using the build id. I would like to do something similar. Instead of hard coding the 1.0 in the build definition, I'd like to retrieve that from .csproj file. I am using the new .csproj file which stores nuget information. For example, I'd like to specify in the csproj: 0.0.1-beta Then, VSTS would append the BuildID and generate the assembly version as 0.0.0.1-beta.49 (49 being the build id) 2 Answers 2 You can create a Power Shell script that retrieves the version from csproj file, then add the ver...