引用自:https://blog.csdn.net/weixin_43288714/article/details/111173508
需求:Jenkins编译dotnet core项目,希望把build的版本在编译时写入到dll/exe文件的file version 属性。
方案:dotnet build 或者dotnet publish等命令,直接传入Version参数。
e.g.
dotnet build /p:AssemblyVersion=1.2.3.4
dotnet publish/p:AssemblyVersion=1.2.3.4