在Visual Studio 2015中使用v90(VS2008)平台工具集 [英] Using v90 (VS2008) Platform Toolset in Visual Studio 2015
问题描述
是否可以(以及如何使用)VS2015 IDE使用编译器,链接器,STL和VS2008附带的一切来构建本地C ++项目?
我想要做的是称为C ++本地多目标,并且知道例如VS2012允许使用VS2008(v90)工具集,用于C ++项目,通过项目属性 - >配置属性 - >通用 - >平台工具集= v90。通常,开箱即用的v90将不可用,但如果您并排安装VS2008 + VS2010 + VS2012或VS2008 + win7.1sdk + VS2012,将出现。
What I'm trying to do is called "C++ Native Multi-Targeting" and is known that e.g. VS2012 allows usage of VS2008 (v90) toolset, for C++ projects, via Project Properties->Configuration Properties->General->Platform Toolset=v90. Normally, out-of-the-box v90 will not be available, but will appear if you make side-by-side installations of VS2008+VS2010+VS2012 or VS2008+win7.1sdk+VS2012.
但是我找不到任何报告的尝试,以弥补vs2008和vs2015之间的更大的差距C ++项目。根据 MSDN ,似乎正式它不被支持。但我想知道它是否可能工作。
But I couldn't find so far any reported attempts at bridging the bigger gap between vs2008 and vs2015 for C++ projects. According to MSDN it seems that officially it's not supported. But I'd like to know if it might work anyway.
供参考,平台工具集值为:
for reference, platform toolset values are:
Visual Studio .NET 2002 (Platform Toolset = 'v70')
Visual Studio .NET 2003 (Platform Toolset = 'v71')
Visual Studio 2005 (Platform Toolset = 'v80')
Visual Studio 2008 (Platform Toolset = 'v90')
Visual Studio 2010 (Platform Toolset = 'v100')
Visual Studio 2012 (Platform Toolset = 'v110')
Visual Studio 2013 (Platform Toolset = 'v112')
Visual Studio 2015 (Platform Toolset = 'v114')
推荐答案
这应该是可能的。我试过,但MSBuild失败,并显示以下消息:
It should be possible. I have tried it but MSBuild fails with the following message:
1> C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\ Platforms\Win32\Microsoft.Cpp.Win32.Targets(57,5):错误:缺少必需的文件。
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(57,5): error : Required file "" is missing.
我发现的唯一解决方案远在vcxproj文件中添加以下行:
The only solution I have found so far was to add the following line in vcxproj file:
<PropertyGroup Label="Globals">
...
<TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>
缺点:每次更改总是一个完整的构建
Disadvantage: Always a complete build for every change
这篇关于在Visual Studio 2015中使用v90(VS2008)平台工具集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!