So you’ve got your hands on a bright and shiny copy of Visual Studio 2010 Beta 2 and you want to switch your solutions and projects over to it but you don’t want to upgrade your existing TFS 2008 server to TFS 2010 Beta 2 yet because you’re not yet ready for that much change.  The obvious question is, if you change your solution and project formats over to VS2010 can you get them to build on your existing TFS2008 team build servers?

The answer is yes and here’s how:

Step 1: Install the .Net 4.0 Framework Beta 2 on your build server (or just put VS2010 beta 2 on it)

Step 2: Change the Team Build config as follows

  • Stop the Team Build service
  • Go to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies and open up TfsBuildService.exe.config in the text editor of your choice.
  • Find the MSBuildPath setting and set the value as follows
    <add key="MSBuildPath" value="c:\windows\\Framework\v4.0.21006\" />
  • Restart the Team Build service and check that your builds work.
    Step 3: You’re done.  Go and ask your boss for a pay rise for being so efficient.

P.S. If your build breaks with errors like this:

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.

Then it’s likely because you haven’t installed VS2010 installed on your build server.  Go ahead and install it and you should find that the errors are resolved.

So what are you waiting for, go ahead and switch and have fun with VS2010!

…and as always, I take no responsibility if you screw something up – this is beta software after all! :-)