Tuesday, July 29, 2008

MSBuild Error with Web Application Project : errorMSB4019

On windows server 2003 I am using CruiseControl.net (CCNet) to create builds of my application. However, I experience an issue when compiling a web application project (WAP).

This is the reported error:

errorMSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Probably because with vs.net 2005 and vs.net 2008 you need the Web Application Project extension to get the web projects work just like vs.net 2003.

I fixed this error buy installing the Web Application Project Extension from Microsoft. You can download it here.
http://download.microsoft.com/download/9/0/6/906064ce-0bd1-4328-af40-49dca1aef87c/WebApplicationProjectSetup.msi

This msi takes care of putting the missing MSbuild files required for compile web application project files.

3 comments:

  1. Now that *sucks*! Because it means I need VS2005/2008 installed on my build-machine!
    (No?)

    ReplyDelete
  2. NO you dont need to have vs.net 05/05 installed.
    MSBuild comes part of the .net framework. The web project extension is another msi that you can install regardless of vs.net.

    ReplyDelete
  3. I know MSBuild is part of the framework...
    Have you tried installing the WAP extensions without VS? You definitely do need VS on the box mate.

    ReplyDelete