Using Jenkins Version Environment Variable in the MSBuild step

后端 未结 4 818
情深已故
情深已故 2021-02-05 23:45

I\'m currently using the Jenkins \"Version Number Plug-In\" to set an Environment Variable for build version. This works fine within jenkins but i need a way to pass this to MSB

4条回答
  •  野性不改
    2021-02-06 00:32

    This is a MSBuild target that replaces the revision number in the file GlobalAssemblyInfo.cs with the SVN_REVISION variable from Jenkins.

    We have a multi project solution where each project references the same GlobalAssemblyInfo for common information (like version). Modify this so it fits your setup.

    By having the Exists condition the target executes on developer machines where the MSBuildCommunityTasks is not installed. In those cases the version number in GlobalAssemblyInfo.cs is left untouched.

    
    
    
    
    
    

提交回复
热议问题