1

I'm trying to setup a new TeamCity agent.

My new agent is calling: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe

While the existing agents are calling: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\AMD64\CL.exe

The existing agents are doing the right thing as far as I'm concerned, because both are 64bit host and building 64bit binaries. Both are calling msbuild with the same arguments (specifics removed to protect the innocent): C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe (xxxx.sln /clp:PerformanceSummary /p:Configuration=Release /p:Platform=x64)

I've found this blog: http://blogs.msdn.com/b/aaronhallberg/archive/2007/07/16/msbuild-property-evaluation.aspx, which explains how msbuild evaluate properties. But I don't know what properties are used to decide about the tools.

You might wonder why I care about the tool choice. The CL calls succeed in either case (you can run the 32 bit compile under 64bit windows). But on the new agent, I'm getting an error on a pre-compiled header "precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)" - and the pre-compiled header is being consumed by the same AMD64\CL.exe.

So if anyone knows which props msbuild actually uses, it would help me figure this out.

As a side note, I see the cross compiler (x86_amd64\CL.exe) in Visual Studio projects property pages under VC++ Directories, Executable Directories, on my workstation. Which is Win 7, 64bit. It says it is inherited, and I haven't customized the msbuild props (in C:\Users\bdelavega\AppData\Local\Microsoft\MSBuild\v4.0). Why would that be the default?

Bill de la Vega
  • 101
  • 1
  • 8

1 Answers1

0

This post explains that msbuild defaults to using the cross compiler when called from VS 2010 and that there is a command line switch to override it.

http://social.msdn.microsoft.com/Forums/en-US/vcprerelease/thread/d6b352ea-12b6-4867-b86d-a052fbab1da4

It's not the complete answer, but it gives me enough to overcome my issue.

Bill de la Vega
  • 101
  • 1
  • 8