4
votes

I am setting up Jenkins with MSBuild. I was getting the below error while building through jenkins

MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" was not found

So I downloaded and installed the MSBuild from the below URL.

http://www.microsoft.com/en-in/download/confirmation.aspx?id=40760

But it's does not contain v12.0 folder . What should i need to do here ?

2

2 Answers

8
votes

You need to install the Visual Studio 2013 Shell (Isolated) package from https://visualstudio.microsoft.com/vs/older-downloads/isolated-shell/ to get the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets file to build your project.

1
votes

This is very easy to do. Open your build definition and go to the "Process" page. Then under the "3. Advanced" group you have a property called "MSBuild Arguments". Place the parameter there with the following syntax

/p:VisualStudioVersion=12.0 

If you have more parameters, separate them with a space and not a comma.

enter image description here