简体   繁体   English

什么是 Visual Studio 项目中的“平台工具集”设置

[英]What is "Platform Toolset" setting in visual studio project

I have three doubts.我有三个疑问。 Anyone there for help?有人帮忙吗?

  1. What is the "Platform Toolset" project setting in VS project VS项目中的“平台工具集”项目设置是什么
  2. Why such setting required为什么需要这样的设置
  3. What happen, if I change the setting (v110 to v100)如果我更改设置会发生什么(v110 到 v100)

It is an MSBuild property that controls the specific version of the platform toolset that you want to use.它是一个 MSBuild 属性,用于控制要使用的平台工具集的特定版本。

More info here: http://msdn.microsoft.com/en-us/library/windows/hardware/hh454232%28v=vs.85%29.aspx更多信息在这里:http: //msdn.microsoft.com/en-us/library/windows/hardware/hh454232%28v=vs.85%29.aspx

Most likely you want to use the last stable Windows SDK.您很可能希望使用最新的稳定 Windows SDK。 You can check the toolset that you are using looking at your Visual Studio project file (.vcxproj), looking for this XML entry:您可以检查您正在使用的工具集,查看您的 Visual Studio 项目文件 (.vcxproj),查找此 XML 条目:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"
      Label="Configuration">
  <ConfigurationType>Driver</ConfigurationType>
  <DriverType>KMDF</DriverType>
  <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
</PropertyGroup>

它是用于编译和链接项目的所有工具的版本。

Moreless it is a version of toolchain that is used to build your project.更何况它是用于构建项目的工具链版本。 So depends on version you have selected, different compiler, linker (etc) versions are used.因此,取决于您选择的版本,使用不同的编译器、链接器(等)版本。 If you select toolset version that was released with VS2017 (v141), MSBuild will use tools from this toolset do build your project.如果您选择随 VS2017 (v141) 发布的工具集版本,MSBuild 将使用此工具集中的工具来构建您的项目。

It is nicely described under link provided by: YoavKlein.它在以下提供的链接中得到了很好的描述:YoavKlein。 "The platform toolset consists of the C++ compiler (cl.exe) and linker (link.exe), along with the C/C++ standard libraries. Since Visual Studio 2015, the major version of the toolset has remained at 14, which means that projects compiled with Visual Studio 2019 or Visual Studio 2017 are ABI-backwards-compatible with projects compiled with Visual Studio 2015. The minor version has updated by 1 for each version since Visual Studio 2015: Visual Studio 2015: v140 Visual Studio 2017: v141 Visual Studio 2019: v142" “平台工具集由 C++ 编译器 (cl.exe) 和链接器 (link.exe) 以及 C/C++ 标准库组成。自 Visual Studio 2015 以来,工具集的主要版本保持在 14,这意味着使用 Visual Studio 2019 或 Visual Studio 2017 编译的项目与使用 Visual Studio 2015 编译的项目向后兼容 ABI。自 Visual Studio 2015 以来,每个版本的次要版本都更新了 1:Visual Studio 2015:v140 Visual Studio 2017:v141 Visual工作室 2019:v142"

So there is no difference in ABI if the major version is same (but in your case you ask about change from v110 to v100 so the compatibility may be broken), but it may happen that fe compiler provided with older version of toolset does not implement some features of the new or incomming c++ standard etc.因此,如果主要版本相同,ABI 没有区别(但在您的情况下,您询问从 v110 到 v100 的更改,因此兼容性可能会被破坏),但可能会发生旧版本工具集提供的 fe 编译器没有实现新的或即将到来的 c++ 标准等的一些特性。

  1. In Visual Studio, in Solution Explorer, open the shortcut menu for your project (not for your solution) and then choose Properties to open your project Property Pages dialog box.在 Visual Studio 的解决方案资源管理器中,打开项目的快捷菜单(而不是解决方案),然后选择“属性”以打开项目的“属性页”对话框。

  2. In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.在“属性页”对话框中,打开“配置”下拉列表,然后选择“所有配置”。

  3. In the left pane of the dialog box, expand Configuration Properties and then select General.在对话框的左窗格中,展开配置属性,然后选择常规。

  4. In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list.在右侧窗格中,选择平台工具集,然后从下拉列表中选择所需的工具集。 For example, if you have installed the Visual Studio 2010 toolset, select Visual Studio 2010 (v100) to use it for your project.例如,如果您已安装 Visual Studio 2010 工具集,请选择 Visual Studio 2010 (v100) 以将其用于您的项目。

  5. Choose the OK button.选择确定按钮。

The mapping between PlatformToolset and Visual Studio versions is as follows PlatformToolset 与 Visual Studio 版本的对应关系如下

  • Visual Studio 2012: v110视觉工作室 2012:v110
  • Visual Studio 2013: v120视觉工作室 2013:v120
  • Visual Studio 2015: v140视觉工作室 2015:v140
  • Visual Studio 2017: v141视觉工作室 2017:v141
  • Visual Studio 2019: v142视觉工作室 2019:v142
  • Visual Studio 2022: v143 Visual Studio 2022:v143

(v130 was skipped) (跳过 v130)

Taken from摘自

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 希望使用错误的平台工具集进行构建 - Visual Studio wants to build with wrong platform toolset Visual Studio 平台工具集与 Windows SDK - Visual studio platform toolset vs Windows SDK Visual Studio Platform工具集和运行时库 - Visual Studio Platform toolset and Runtime Library Visual Studio Installer 在 VS 2019 中安装的 LLVM 的平台工具集名称是什么? - What is the Platform Toolset name of LLVM installed by Visual Studio Installer in VS 2019? 我需要安装什么来使用Visual Studio 2013编译Platform Toolset v100? - What I need to install to compile for Platform Toolset v100 using Visual Studio 2013? 如何将Visual Studio 2005的平台工具集添加到较新IDE版本的“Platform Toolset”列表中? - How can I add the platform toolset of Visual Studio 2005 into the `Platform Toolset` list of the newer IDE versions? 使用Visual Studio 2012并使用较旧的平台工具集进行编译? - Use Visual Studio 2012 and compile with older platform toolset? 找不到 Visual Studio Platform 2015 工具集 =&#39;v141&#39; - Visual Studio Platform 2015 Toolset ='v141' cannot be found Visual Studio _MSC_VER与平台工具集 - Visual Studio _MSC_VER versus Platform Toolset Visual Studio:如何使用平台工具集作为预处理器指令? - Visual Studio: How to use platform toolset as preprocessor directive?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM