Many articles show how to set up Jenkins and MSBuild but what they miss is how to configure MSBuild in Jenkins.
Here I am showing how to integrate Jenkins with MSBuild. If you are new to Jenkins, please refer to this article to get the basics.
Let's log in into Jenkins as shown in the below screen.
Here I am showing how to integrate Jenkins with MSBuild. If you are new to Jenkins, please refer to this article to get the basics.
Let's log in into Jenkins as shown in the below screen.
From the left menu click in the Manage Jenkins tab,
It will show a list of items shown as per the below screen, from that list select Global Tool Configuration.
From the Global tool configurations, you can setup MSBuild Configuration.

Here, you have to copy the MSBuild.exe path from your system- Program files and paste it to Path to MSBuild textbox.

Give a name for your MSBuild and now, apply and save the changes.
Now, go to the New Item tab from the main menu, enter the Item name here I have given a name 'My Project'

Select a Freestyle project, click on ok.
Next, Navigate to the Build Environment tab as shown in the below screen, you can find the newly created MSBuild (MyMSBuild) from the MSBuild Version drop-down.
Here we have set up two parameters; you have to give your solution file path in MSBuild File text box and for release mode settings write:/p: Configuration=Release
It will give output code in Release Any CPU Mode.
Finally, click on apply and save to complete the configurations. If you want to implement how to setup .NET project build using Jenkins, please refer to this article.
I hope you like this article, in my next article we will see the master and slave concept in Jenkins.

Shiv SinghPosted Aug 26, 2020, 3:37 AM
Hi Ankur, I followed the above steps but I did not find any MS-Build option in Jenkins. Please let me know what I have to do to see the MS-Build option.
Gowtham RajamanickamPosted Jul 21, 2020, 8:33 AM
I have a scenario Jenkins server created using AWS Linux and this steps is possible to use MS build.Can you share me the lknks using jenkins ubuntu with ms build.
Sneha MuthaPosted Jul 14, 2020, 7:10 AM
When we are adding MS Build Details we have an checkbox option Install Automatically. I have checked the option the I got an dropdown Add Installer . Could you please explain what is the use of that option?
Sneha MuthaPosted Jul 14, 2020, 7:07 AM
We are building the WSP in Visual Studio 2015 so how can we get the file into Jenkins and deploy ?
Maria TorinoPosted Sep 5, 2019, 1:52 PM
Does anyone know if MS Build can be considered as a good replacement/alternative for Jenkins or Travis? Or do they have to be used always integrated?
gayathri kPosted Oct 17, 2018, 5:15 PM
Do have any idea how to add 'Microsoft.ACE.OLEDB.12.0' DB to Jenkins project
Tridip BhattacharjeePosted Sep 9, 2018, 11:52 AM
What is the objective of Integrate Jenkins With MSBuild ?
balakrishna maddhurPosted Sep 5, 2018, 11:27 PM
Since many days I am looking for MS Build with Jenkins I didn't get on any site now it's very clear. Thank you for this.
Sarathlal SaseendranPosted Sep 5, 2018, 9:43 AM
Useful article. Thanks