27. April 2010 12:27
After upgrading the TFS server and the build server, everything seemed fine until I fired the first upgraded build. When you upgrade a build, you use the UpgradeTemplate, which basically has only one activity which is to fire off the MSBuild with the TFSBuild.proj you used also in TFS 2008.
When I fired my build, I got the following error:
TF270000: The TFSBuild workflow activity cannot continue because it requires a build targets file that is version 3 or higher. The version of the current build targets file is 2. To fix this problem, log on to build machine TFS2008_BS, open Control Panel, and run Repair on Microsoft Team Foundation Server 2010 to reinstall the appropriate version of C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets.
Of course I tried to repair the installation, but that did not solve the issue.
What is happening is that TFS 2010 uses an updated Microsoft.TeamFoundation.Build.targets file in C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild. In my installation this file was not updated, also not in the repair (that is why you should repair the installation: it will replace the targets file).
The solution in my case was to manually replace the targets file with the 2010 one, which is attached to this post.
There is also a Connect bug on this issue, please vote on this if you have the problem too: http://connect.microsoft.com/VisualStudio/feedback/details/542413/tfsbuild-fails-because-target-file-is-wrong-version
Microsoft.TeamFoundation.Build.targets (85 KB)