Building C++ project on a PC with Windows SDK 7.1 but without VS2010

ⅰ亾dé卋堺 提交于 2019-12-02 23:54:07

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!