我正在开发一个命令行应用程序,它创建一个完整的Visual Studio 11解决方案,由单个VC++项目组成,并尝试使用MSBuild最终编译它.
我面临的问题很奇怪.
如果我在Visual Studio 11中执行我的命令行程序,它的工作原理; 如果我在开发环境之外启动它,它会抛出错误:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(511,5): error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. [f:\ABC.vcxproj]
Run Code Online (Sandbox Code Playgroud)
我正在使用的命令如下:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe f:\snake\W9A30040.vcxproj /property:PlatformToolset=v110;Configuration=Debug /v:quiet
Run Code Online (Sandbox Code Playgroud)
但我觉得PlatformToolset = v110被忽略,MSBuild使用v100(Visual Studio 2010).
您对如何告诉MSBuild编译v110 Platform Toolset有什么建议吗?