Thursday, May 26, 2016

Setting up automatic product or build version increment using JENKINS for .NET projects

Steps for setting up automatic product or build version increment using JENKINS Continious Integration server and Visual Studio for .NET projects

Part A - Configure Visual Studio Solution

1. Copy the "AssemblyInfo.cs" from your project solutions and rename into "AssemblyInfo.cs.template"



2. Add a file called "AssemblyInfo.cs.template" and replace with these two lines:
             [assembly: AssemblyVersion("#VERSION_NUMBER#")]
             [assembly: AssemblyFileVersion("#VERSION_NUMBER#")]

3. In project properties, insert this pre-build command:
     "$(SolutionDir)builder-scripts\templates\pre-build\Stamper.exe" "$(ProjectDir)\"



4. Put the "builder-scripts" folder into your solution folder. Builder scripts source


Part B - Configure Jenkins Continuous Integration Server

5. Configure Jenkins builds and insert following in build shell

                 .\builder-scripts\templates\pre-build\Stamper.exe .



6. Set Jenkins build number and build the project


7. Right-click recently build EXE , Properties ==> Details (you will see updated production/build version) 






C# , Jenkins

0 comments :

Post a Comment

 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me