I have been tasked with creating a build definition in TFS2010 that will build 2010 c++ projects (vcxproj files), but using the 2005 toolset (v80). After searching on the internet, I do believe that this is possible after reading this(1) and this(2). After reading those articles, I have installed VS2005 on my build machine and read this article and installed Daffodil for Visual Studio. Once these steps had been done, I was able to change the Platform Toolset to v80 for all required projects and proceeded to set up a build definition to build the projects for a Release configuration and Win32/x64 platforms.
After running the build definition, the very first project (on Win32 platform) failed to build with the following error message:
TRACKER: Failed to locate: "CL.exe". The system cannot find the file specified.
I also tried removing the Win32 platform from the build definition so that only the x64 platform will get built. This resulted in the following error (again, on the very first project):
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets (151): "cmd.exe" exited with code 9009.
I have a feeling I'm close to getting where I want to be, but I've obviously missed or misunderstood something on the way and I can't seem to figure out what that is.
After the first build failed (for the Win32 platform) I noticed that there was a difference to my log and the sample log file posted about half way down the page of the second article I read during research. Mine looked like this:
CL.exe /c /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /......
While the sample build log looks like this:
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /......
At a guess, I would think that I have missed something concerning the .props and .targets files or possibly something to do with the VC++ directories, but the solution is eluding me.
UPDATE
I have created a test build definition to build a single vcxproj file using the 2005 toolset for the a Release Configuration with the Win32/x64 platforms. I have changed the Executable Directories in the VC++ Directories of the project properties to point at C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin & C:\Program Files\Microsoft Visual Studio 8\VC\bin as this is where CL.exe can be found for both platforms. This does seem get around the "Failed to Locate CL.exe" problem, but the build fails for both platforms with the error "cmd.exe exited with code 9009". Not much better than before, but a little more consistent at least.