Skip to content

Fix the Missing webapplication.targets Error on a Build Server

by dotnetdave on April 23rd, 2010

Table of contents for Visual Studio 2010 Upgrade

  1. Upgraded to Visual Studio 2010
  2. Fix the Missing webapplication.targets Error on a Build Server

The Issue

I recently upgraded and converted my first solution to VS2010.On doing so I discovered that the continuous build was failing for this solution. The error that I was receiving was that the webapplication.targets file for VS2010 could not be found

The imported project “C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.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.

The Fix

The solution to this issue had me stumped for an hour just copy the v10.0\WebApplications\Microsoft.WebApplication.targets files from your machine where the v10.0\ WebApplications\Microsoft.WebApplication.targets are located to the directory reported in the error. The files will be located at C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets

This fixed the issue and the build returned to being green.

Have you had this issue? Leave a comment here.

From → ASP.Net

4 Comments
  1. Or at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications on a 64 bit server.

  2. land cruiser permalink

    Great detailed info, I just bookmarked you on my google reader.

    Sent from my iPhone 4G

  3. DMac permalink

    We ran into this issue as well and, while copying the file into the proper directory on the build server would surely do the trick, doesn’t that seem a little hacky? The other option, installing VS2010 on the build server seems equally as absurd. Is there any concern with manually copying this file over and breaking with future releases of VS2010?

    I’ve been spelunking the web for over a day now, and these two options seem to be the only ones I can come across.

Trackbacks & Pingbacks

  1. Upgraded to Visual Studio 2010 | Dot Net Dave

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS