You’ve upgraded your project to Visual Studio 2010 and .Net framework 4. Good for you! But when you commit it to the source control, the automatic build in TeamCity starts to run, and alas, build failed!

In order to run an upgraded project in Visual Studio 2010 follow these steps:

  1. Make sure your TeamCity server can run Visual Studio S2010 solutions (version 5 and up of TC). 2. Install Visual Studio 2010 and .Net framework 4 on your server.
  2. If your project is a web project which uses Web Deployment Project, install web deployment project for Visual Studio 2010 on the server.

Now you need to configure TeamCity to run your project in Visual Studio 2010:

  1. Enter your TeamCity web site
  2. Click “Administration” button
  3. Click your project configuration in the projects list
  4. Click on “Runner” in the right menu (Can show as “Runner: Visual Studio (sln)”)
  5. Change the value of “Visual Studio” property to “Visual Studio 2010”
  6. If you are using NUnit, change the value of “Framework” under the NUnit definitions to 4.0 (if that doesn’t appear select a different version of NUnit.

Now you can run the build and all we be green as grass

Good luck!