Geeks With Blogs
David Williams Who's scruffy looking?

Recently we upgraded one of our solutions from Visual Studio 2008 to Visual Studio 2010.  After checking in our code to our 2008 Team Foundation Server, the CI build unexpectedly failed.  We were getting errors like:

c:\build\MyApplication\MyApplication.csproj(89,3): error MSB4019: 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.

After a bit of Googling, I did the following:

  1. Install .Net framework 4.0 on build server (
  2. Modified the TFSBuildService.exe.config file at C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies to use the 4.0 framework for building.  I changed the MSBuildPath key to C:\[WINDOWS\Microsoft.NET\Framework\v4.0.30319.
  3. Restart Build Service.
  4. Install Visual Studio 2010 on the Build server.

This seemed to help, however I received another error related to TFS workspaces:

C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5,801,5): error : The path c:\controlsite\nightly is already mapped in workspace TFSSERVER_83. [C:\BuildWorking\Muzak Control Site\Control Site Nightly Build\BuildType\TFSBuild.proj]

I used the Team Foundation Server Sidekick to remove the conflicting workspaces.  The builds then ran fine.

I referenced the following:

Richard Banks - How To Build VS2010 Solutions Using TFS2008 Team Build

Building Visual Studio 2010 solutions using Team Build 2008

Posted on Thursday, November 11, 2010 11:16 AM | Back to top

Comments on this post: Building Visual Studio 2010 projects in TFS 2008

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © David Williams | Powered by: