Monday, December 31, 2007

Building VS 2008 Projects on TFS 2005

Been through this issue and looked around for a solution but finally got it working by doing the following 2 steps:
  • Copy your C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0 to C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0 as it is on the TFS Build Server
  • Add the following imports to your Team Build
    Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
  • Add the following in your Team Build to let TFS 2005 Build Service be able to run the build using MSBuildCommunityTasks
    <Target Name="BeforeCompile">
    Attrib Files="$(SolutionRoot)\GulfCapitalIntranet\GulfCapitalIntranet.sln" ReadOnly="false" Hidden="false" System="false" Normal="true" />
    FileUpdate Files="$(SolutionRoot)\GulfCapitalIntranet\GulfCapitalIntranet.sln" Regex="Microsoft Visual Studio Solution File, Format Version 10.00" ReplacementText="Microsoft Visual Studio Solution File, Format Version 9.00" />

That's all what you need to be able to build your VS 2008 projects successfuly on TFS 2005.

Hope that helps

No comments: