c++ - 如何为 VS2017 自定义 Microsoft.Cpp.Win32.User.props?

标签 c++ visual-studio-2017

传统上,我们已经能够设置 Microsoft.Cpp.Win32.User.props 文件,以帮助我们使用 PlatformToolset 为不同版本的 Visual Studio 进行不同的设置:

Visual Studio 2012 = v100

Visual Studio 2013 = v120

Visual Studio 2015 = v140

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0">
  <PropertyGroup Condition="$(PlatformToolset) == 'v100'">
    <IncludePath>C:\SDKs\boost_1_53_0;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="$(PlatformToolset) == 'v120'">
    <IncludePath>C:\SDKs\boost_1_59_0;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="$(PlatformToolset) == 'v140'">
    <IncludePath>C:\SDKs\boost_1_64_0;$(IncludePath)</IncludePath>
  </PropertyGroup>

但我不知道如何为 Visual Studio 2017 执行此操作。什么版本的 PlatformToolset 是否正在使用,还是已完全放弃?

最佳答案

刚在我的 .vcxprof 文件中找到这个:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <PlatformToolset>v141</PlatformToolset>
  </PropertyGroup>

使用 PlatformToolset = v141 工作正常。

关于c++ - 如何为 VS2017 自定义 Microsoft.Cpp.Win32.User.props?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43950680/

相关文章:

f# - 使用 VS 2017 时无法解析对程序集 FSharp.Core 4.4.1.0 的依赖

c++ - 如何编写 SFINAE 来测试解析器规则?

c++ - 如何用用户的输入填充二维数组?

c++ - OpenCV 中的调试断言错误

visual-studio - 如何在Visual Studio 2017 Web Proj ASP.NET Core 2.0中禁用Https

c# - Mac 上的 Visual Studio Community 2017 : How to view same file in two columns?

C++ 从异步线程更新 Windows 窗口

visual-studio - 通过 Manage NuGet Packages 安装 Bootstrap 后,bootstrap 文件不显示以供引用

c++ - 为什么va_arg(va_list,type)给我C6285警告?

c++ - 为什么C++优化器在删除同一个指针时使用不同的delete