Skip to content

Commit 0465d39

Browse files
author
Colin Robertson
authored
Merge pull request #3064 from MicrosoftDocs/master637528132148881961
Repo sync for protected CLA branch
2 parents b18a985 + a731c77 commit 0465d39

26 files changed

+860
-850
lines changed

docs/build/how-to-modify-the-target-framework-and-platform-toolset.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
11
---
22
description: "Learn more about: How to: Modify the Target Framework and Platform Toolset"
33
title: "How to: Modify the Target Framework and Platform Toolset"
4-
ms.custom: "conceptual"
5-
ms.date: "07/24/2019"
4+
ms.custom: "contperf-fy21q3"
5+
ms.date: 03/31/2021
66
helpviewer_keywords: ["msbuild (c++), howto: modify target framework and platform toolset"]
7-
ms.assetid: 031b1d54-e6e1-4da7-9868-3e75a87d9ffe
87
---
98
# How to: Modify the Target Framework and Platform Toolset
109

11-
You can edit a Visual Studio C++ project file to target different versions of the C++ platform toolset, the Windows SDK and the .NET Framework (C++/CLI projects only). By default, the project system uses the .NET Framework version and the toolset version that correspond to the version of Visual Studio that you use to create the project. You can modify all these values in the .vcxproj file so that you can use the same code base for every compilation target.
10+
You can edit a Visual Studio C++ project file to target different versions of the C++ platform toolset. The Windows SDK and the .NET Framework used are also editable. (The .NET Framework applies to C++/CLI projects only). A new project uses the default .NET Framework and toolset of the Visual Studio version that you use to create the project. If you modify these values in the .vcxproj file, you can use the same code base for every compilation target.
1211

1312
## Platform toolset
1413

15-
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:
14+
The platform toolset consists of the C++ compiler (cl.exe) and linker (link.exe), along with the C/C++ standard libraries. Visual Studio 2015, Visual Studio 2017, and Visual Studio 2019 are binary-compatible. It's shown by the major version of the toolset, which has remained at 14. Projects compiled in Visual Studio 2019 or Visual Studio 2017 are ABI-backwards-compatible with 2017 and 2015 projects. The minor version has updated by 1 for each version since Visual Studio 2015:
1615

1716
- Visual Studio 2015: v140
1817
- Visual Studio 2017: v141
1918
- Visual Studio 2019: v142
2019

21-
These toolsets support .NET Framework 4.5 and later.
20+
These toolsets support the .NET Framework 4.5 and later.
2221

23-
Visual Studio also supports multitargeting for C++ projects. You can use the Visual Studio IDE to edit and build projects that were created with older versions of Visual Studio, without upgrading them to use a new version of the toolset. You do need to have the older toolsets installed on your computer. For more information, see [How to use native multi-targeting in Visual Studio](../porting/use-native-multi-targeting.md). For example, in Visual Studio 2015, you can *target* .NET Framework 2.0 but you must use an earlier toolset that supports it.
22+
Visual Studio also supports multitargeting for C++ projects. You can use the latest Visual Studio IDE to edit and build projects created by older versions of Visual Studio. It doesn't require a project upgrade the projects to use a new version of the toolset. It does require the older toolset is installed on your computer. For more information, see [How to use native multi-targeting in Visual Studio](../porting/use-native-multi-targeting.md). For example, in Visual Studio 2015, you can *target* .NET Framework 2.0, but you must use an earlier toolset that supports it.
2423

2524
## Target framework (C++/CLI project only)
2625

27-
When you change the target Framework, also change the platform toolset to a version that supports that Framework. For example, to target the .NET Framework 4.5, you must use a compatible platform toolset such as Visual Studio 2015 (v140), Visual Studio 2013 (v120) or Visual Studio 2012 (v110). You can use the [Windows 7.1 SDK](https://www.microsoft.com/download/details.aspx?id=8279) platform toolset to target the .NET Framework 2.0, 3.0, 3.5, and 4, and the x86/x64 platforms.
26+
When you change the target Framework, also change the platform toolset to a version that supports that Framework. For example, to target the .NET Framework 4.5, you must use a compatible platform toolset. These toolsets include Visual Studio 2015 (v140), Visual Studio 2013 (v120), or Visual Studio 2012 (v110). You can use the [Windows 7.1 SDK](https://www.microsoft.com/download/details.aspx?id=8279) to target .NET Framework 2.0, 3.0, 3.5, and 4.
2827

2928
You can extend the target platform further by creating a custom platform toolset. For more information, see [C++ Native Multi-Targeting](https://devblogs.microsoft.com/cppblog/c-native-multi-targeting/) on the Visual C++ blog.
3029

3130
### To change the target Framework
3231

33-
1. In Visual Studio, in **Solution Explorer**, select your project. On the menu bar, open the **Project** menu and choose **Unload project**. This unloads the project (.vcxproj) file for your project.
32+
1. In Visual Studio, in **Solution Explorer**, select your project. On the menu bar, open the **Project** menu and choose **Unload project**. This command unloads the project (.vcxproj) file for your project.
3433

3534
> [!NOTE]
36-
> A C++ project cannot be loaded while the project file is being modified in Visual Studio. However, you can use another editor such as Notepad to modify the project file while the project is loaded in Visual Studio. Visual Studio will detect that the project file has changed and prompt you to reload the project.
35+
> A C++ project can't be loaded while you edit the project file in Visual Studio. However, you can use another editor such as Notepad to modify the project file while the project is loaded in Visual Studio. Visual Studio will detect that the project file has changed and prompt you to reload the project.
3736
3837
1. On the menu bar, select **File**, **Open**, **File**. In the **Open File** dialog box, navigate to your project folder, and then open the project (.vcxproj) file.
3938

@@ -45,19 +44,23 @@ You can extend the target platform further by creating a custom platform toolset
4544

4645
1. In **Solution Explorer**, open the shortcut menu for your project and then choose **Reload Project**.
4746

48-
1. To verify the change, in **Solution Explorer**, right-click to open the shortcut menu for your project (not for your solution) and then choose **Properties** to open your project **Property Pages** dialog box. In the left pane of the dialog box, expand **Configuration Properties** and then select **General**. Verify that **.NET Target Framework Version** shows the new Framework version.
47+
1. To verify the change, on the menu bar, select **Project** > **Properties** to open your project **Property Pages** dialog box. In the dialog box, select the **Configuration Properties** > **General** property page. Verify that **.NET Target Framework Version** shows the new Framework version.
4948

5049
### To change the platform toolset
5150

52-
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.
51+
1. In Visual Studio, on the menu bar, select **Project** > **Properties** to open your project **Property Pages** dialog box.
5352

54-
1. In the **Property Pages** dialog box, open the **Configuration** drop-down list and then select **All Configurations**.
53+
1. In the top of the **Property Pages** dialog box, open the **Configuration** drop-down list and then select **All Configurations**.
5554

56-
1. In the left pane of the dialog box, expand **Configuration Properties** and then select **General**.
55+
1. In the dialog box, select the **Configuration Properties** > **General** property page.
5756

58-
1. 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.
57+
1. In the properties page, select **Platform Toolset** and then select the toolset you want from the drop-down list. For example, if you've installed the Visual Studio 2010 toolset, select **Visual Studio 2010 (v100)** to use it for your project.
5958

60-
1. Choose the **OK** button.
59+
1. Choose the **OK** button to save your changes.
60+
61+
## Next Steps
62+
63+
[Walkthrough: Working with Projects and Solutions (C++)](../ide/walkthrough-working-with-projects-and-solutions-cpp.md)
6164

6265
## See also
6366

docs/build/integrate-vcpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ If you've used the **`integrate`** option, you should remove the integration bef
4747
[Install vcpkg](install-vcpkg.md)\
4848
[Manage libraries with vcpkg](manage-libraries-with-vcpkg.md)\
4949
[vcpkg command-line reference](vcpkg-command-line-reference.md)\
50-
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/index.md)\
50+
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/README.md)\
5151
[Frequently asked questions](https://github.com/microsoft/vcpkg/blob/master/docs/about/faq.md)

docs/build/manage-libraries-with-vcpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,6 @@ Type **`vcpkg remove`** to remove an installed library. If any other libraries d
319319
[Install vcpkg](install-vcpkg.md)\
320320
[Integrate vcpkg](integrate-vcpkg.md)\
321321
[vcpkg command-line reference](vcpkg-command-line-reference.md)\
322-
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/index.md)\
322+
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/README.md)\
323323
[Frequently asked questions](https://github.com/microsoft/vcpkg/blob/master/docs/about/faq.md)\
324324
[Installing and Using Packages Example: SQLite](https://github.com/microsoft/vcpkg/blob/master/docs/examples/installing-and-using-packages.md)

docs/build/vcpkg-command-line-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ A quick reference to the commands available in vcpkg.
4545
[Install vcpkg](install-vcpkg.md)\
4646
[Integrate vcpkg](integrate-vcpkg.md)\
4747
[Manage libraries with vcpkg](manage-libraries-with-vcpkg.md)\
48-
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/index.md)\
48+
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/README.md)\
4949
[Frequently asked questions](https://github.com/microsoft/vcpkg/blob/master/docs/about/faq.md)

docs/build/vcpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ Use the **`vcpkg contact --survey`** command to send feedback to Microsoft about
5757
[Integrate vcpkg](integrate-vcpkg.md)\
5858
[Manage libraries with vcpkg](manage-libraries-with-vcpkg.md)\
5959
[vcpkg command-line reference](vcpkg-command-line-reference.md)\
60-
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/index.md)\
60+
[Quick start](https://github.com/microsoft/vcpkg/blob/master/docs/README.md)\
6161
[Frequently asked questions](https://github.com/microsoft/vcpkg/blob/master/docs/about/faq.md)

docs/c-runtime-library/reference/ceil-ceilf-ceill.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ By default, this function's global state is scoped to the application. To change
6262
6363
|Routine|Required header|
6464
|-------------|---------------------|
65-
|**ceil**, **ceilf**, **ceill**|\<math.h>|
66-
|**ceil** macro | \<tgmath.h> ||
65+
| **ceil**, **ceilf**, **ceill**| \<math.h> |
66+
| **ceil** macro | \<tgmath.h> |
6767
6868
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6969

docs/c-runtime-library/reference/floor-floorf-floorl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ By default, this function's global state is scoped to the application. To change
6363
|Function|Required header|
6464
|--------------|---------------------|
6565
|**floor**, **floorf**, **floorl**|\<math.h>|
66-
|**floor** macro | \<tgmath.h> ||
66+
|**floor** macro | \<tgmath.h> |
6767
6868
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6969

docs/c-runtime-library/reference/fmin-fminf-fminl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ If you use the \<tgmath.h> `fmin()` macro, the type of the argument determines w
7676
|Routine|Required header|
7777
|-------------|---------------------|
7878
|**fmin**, **fminf**, **fminl**|C: \<math.h><br />C++: \<math.h> or \<cmath>|
79-
|**fmin** macro | \<tgmath.h> ||
79+
|**fmin** macro | \<tgmath.h> |
8080
8181
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
8282

docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ By default, this function's global state is scoped to the application. To change
7676
|Routine|Required header|
7777
|-------------|---------------------|
7878
|**lround**, **lroundf**, **lroundl**, **llround**, **llroundf**, **llroundl**|\<math.h>|
79-
|**lround** macro | \<tgmath.h> ||
79+
|**lround** macro | \<tgmath.h> |
8080
8181
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
8282

docs/c-runtime-library/reference/round-roundf-roundl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ By default, this function's global state is scoped to the application. To change
6161
|Routine|Required header|
6262
|-------------|---------------------|
6363
|**round**, **roundf**, **roundl**|\<math.h>|
64-
|**round** macro | \<tgmath.h> ||
64+
|**round** macro | \<tgmath.h> |
6565
6666
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6767

0 commit comments

Comments
 (0)