I have a C++ project (some sort of a console 32-bit appplication) developed in VS2010, which builds just fine on my PC (Windows 7 32-bit). My PC has Microsoft SDK 7.0A installed
I've finally found some kind of a workable and meaningful workaround for the issue - inside "Can we build *.vcxproj(c++ project) using MSBuild 4.0 without installing the Visual Studio 2010?".
In short: I have to explicitly specify the Platform Toolset when building the solution on a PC without VS2010. The command will look like:
msbuild /p:PlatformToolset=Windows7.1SDK core.sln
You will probably need to go same way if your project has v100
or v90
specified as the Platform Toolset.
And an extra hint for TeamCity's enthusiasts, running the server on a PC with a lone Windows SDK installed.
Instead of modifying all build steps, it is enough to specify the Platform Toolset in the agent's properties.
To do that add following line to ?:\TeamCity\buildAgent\conf\buildAgent.properties
:
system.PlatformToolset=Windows7.1SDK
Happy building! :)
Also you can add this node & value to registry (correct with your install dirs & win 32/64 version).
---begin .reg file---
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS]
"ProductDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\"
---end .reg file---
because of MSBuild script %ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\Windows7.1SDK\Microsoft.Cpp.Win32.Windows7.1SDK.props" search for VSInstallDir.