I have this one liner that can publish my project:
& "$($linkToMSBuildEXE)" "$($solutionName)" /t:projectName /p:Configuration="Release"
I need to publish this project and set the assemblyVersion and fileVersion of the output executable. I have tried adding the version:
& "$($linkToMSBuildEXE)" "$($solutionName)" /t:projectName /p:Configuration="Release"/p:Version=1.1.1.1
This doesn't seem to work. Do I need to add an entry to the csproj file? How can I set the versions via the command line.
Install MSBuild.AssemblyVersion
package from NuGet.
Use the following or similar command line:
msbuild project.csproj /t:Rebuild /p:AssemblyVersionNumber=1.2.3.4
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.