4

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 ?

Midhun Murali
  • 1,841
  • 5
  • 25
  • 47

2 Answers2

8

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.

Daniel
  • 2,604
  • 1
  • 29
  • 41
seangrieve
  • 1,105
  • 10
  • 10
  • Hi @seangrieve the download has been removed do you know any mirror link. It without this the only way left is to install whole Visual studio. – Vivek Raj Mar 08 '18 at 09:46
  • This worked for me. I'm running VStudio 2013, but oddly I could only install the [Visual Studio 2010 Isolated Shell (en-US)] choice (from the link in the answer). Once I installed that (and it is quite a large install) then I could build the web project properly. There seems to have been an update that caused this because I was able to build previous to this on the same machine. Thanks for the great answer. – raddevus Jul 14 '20 at 19:34
1

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

Nalaka
  • 1,145
  • 7
  • 12