[英]Visual Studio 2012 macros uses VS2010 values
My working computer had Visual Studio 2010 installed previously. 我的工作计算机以前安装了Visual Studio 2010。 It was working fine. 工作正常。
To gain full support for C++11, the 2012 was installed to this computer recently (VS2010 was not removed, since some old project need it). 为了获得对C ++ 11的完全支持,最近在这台计算机上安装了2012(不删除VS2010,因为某些旧项目需要它)。
My problem is: If I launch VS2012, the Visual Studio user values (eG $(VSInstallDir), $(VCInstallDir), $(ExecutablePath) etc.) are the VS2010's values, not the values suitable for VS2012. 我的问题是:如果我启动VS2012,Visual Studio用户值(例如,$(VSInstallDir),$(VCInstallDir),$(ExecutablePath)等)是VS2010的值,而不是适合VS2012的值。
What is the reason for it? 是什么原因呢? And how can I solve this problem? 我该如何解决这个问题? The VS2012 must use its' own user values. VS2012必须使用其自己的用户值。
Since multiple installations are there, you can select the Platform Toolset from 由于存在多个安装,因此您可以从以下位置选择“平台工具集”
Project Property Pages\\ Configuration Properties\\General\\Platform Toolset
If it still doesn't work, do the following as last resort: 如果仍然无法使用,请作为最后的方法执行以下操作:
Edit the following file to change the macros: 编辑以下文件以更改宏:
C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\V120\\Microsoft.Cpp.Common.props
For me it is V120. 对我来说是V120。 Whatever version it is for you, change it accordingly. 无论您使用什么版本,请进行相应更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.