Skip to content

Commit 439cb28

Browse files
author
Colin Robertson
committed
Update Windows 10 SDK targeting for 1862
1 parent 3e4adfa commit 439cb28

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,62 @@
11
---
22
title: "How to: Use the Windows 10 SDK in a Windows Desktop Application"
3+
description: "How to set the target SDK version in a Windows Desktop application project to use the Windows 10 SDK."
34
ms.custom: "get-started-article"
4-
ms.date: "07/12/2018"
5+
ms.date: "01/22/2020"
56
ms.assetid: eed6421e-9355-44a6-9582-3f1d453a6d44
67
---
78
# How to: Use the Windows 10 SDK in a Windows Desktop Application
89

9-
When you create a classic Windows desktop project in Visual Studio 2017, it is set up by default to build with the version of the Windows 10 SDK that was installed when the C++ Desktop workload was installed or last updated. This version of the Windows SDK is compatible with Windows 7 and later. See [Using the Windows Headers](/windows/win32/WinProg/using-the-windows-headers) for more information about targeting specific versions of Windows.
10+
When you create a new classic Windows desktop project in Visual Studio, it targets the Windows 10 SDK by default. Visual Studio installs a version of the Windows 10 SDK when you install the C++ Desktop workload. This version of the Windows SDK is compatible with Windows 7 SP1 and later. For more information about targeting specific versions of Windows, see [Using the Windows Headers](/windows/win32/WinProg/using-the-windows-headers).
1011

11-
If you want to target an earlier version of the SDK, you can open **Project | Properties** and choose from the other SDK versions available in the Windows SDK Version dropdown.
12+
When you upgrade an existing project, you have a choice: You can keep using the target Windows SDK specified in your project. Or, you can retarget your project to use the Windows 10 SDK. With the Windows 10 SDK, you get the advantages of support for the latest operating systems and language standards.
1213

13-
Starting with Visual Studio 2015 and the Windows 10 SDK, the CRT library was separated into two parts, one (ucrtbase) that contains the functions that are acceptable to be used in Universal Windows Apps, and one that contains everything else (vcruntime140). Since the Windows 10 SDK contains new functions, such as many C99 functions, you need to follow these steps in order to use those functions. See [CRT Library Features](../c-runtime-library/crt-library-features.md).
14+
## Use the right Windows SDK for your project
1415

15-
### To target the Windows 10 SDK
16+
Starting with Visual Studio 2015, the C Runtime (CRT) library was separated into two parts: One part, ucrtbase, contains the Standard C and Microsoft-specific CRT functions that you can use in Universal Windows Apps. This library is now known as the Universal CRT, or UCRT, and has moved into the Windows 10 SDK. The UCRT contains many new functions, such as C99 functions, needed to support the latest C++ language standards. The other part of the original CRT is vcruntime. It contains the C runtime support, startup, and termination code, and everything else that didn't go into the UCRT. The vcruntime library gets installed along with the C++ compiler and toolset in Visual Studio. For more information, see [CRT library features](../c-runtime-library/crt-library-features.md).
1617

17-
1. Make sure the Windows 10 SDK is installed. The Windows 10 SDK is installed as part of the **Desktop development with C++** workload. A standalone version is available at [Downloads and tools for Windows 10](https://developer.microsoft.com/windows/downloads).
18+
The UCRT is now a system component that's installed on every version of Windows 10. It's also available as an installable component for all earlier supported versions of Windows. You can use the Windows 10 SDK to target all the supported versions of Windows. For a complete list of supported operating systems, see [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk).
19+
20+
To update your projects to use the UCRT when you upgrade from a project version before Visual Studio 2015, follow these steps:
1821

19-
2. Open the shortcut menu for the project node, and choose **Retarget SDK Version**.
22+
### To target the Windows 10 SDK
2023

21-
![Retarget SDK Version](../windows/media/retargetingwindowssdk1.PNG "RetargetingWindowsSDK1")
24+
1. Make sure the Windows 10 SDK is installed. The Windows 10 SDK is installed as part of the **Desktop development with C++** workload. A standalone version is available at [Downloads and tools for Windows 10](https://developer.microsoft.com/windows/downloads).
2225

23-
The **Review Solution Actions** dialog appears.
26+
1. Open the shortcut menu for the project node, and choose **Retarget projects**. (In earlier versions of Visual Studio, choose **Retarget SDK Version**.) The **Review Solution Actions** dialog appears.
2427

2528
![Review Solution Actions](../windows/media/retargetingwindowssdk2.PNG "RetargetingWindowsSDK2")
2629

27-
3. In the **Target Platform Version** dropdown list, choose the version of the Windows 10 SDK you want to target. Choose the OK button to apply the change.
30+
1. In the **Target Platform Version** dropdown list, choose the version of the Windows 10 SDK you want to target. Generally speaking, we recommend you choose the latest installed version. Choose the **OK** button to apply the change.
2831

29-
Note that 8.1 in this context refers to the Windows SDK version, which is also backwardly compatible with Windows 8, Windows Server 2012, Windows 7, Windows Server 2008, and Windows Vista.
32+
The 8.1 in this context refers to the Windows 8.1 SDK.
3033

3134
If this step is successful, the following text appears in the Output window:
3235

3336
`Retargeting End: 1 completed, 0 failed, 0 skipped`
3437

35-
4. Open the project properties, and in the **Configuration Properties, General** section, notice the values of **Windows Target Platform Version**. Changing the value here has the same effect as following this procedure. See [General Property Page (Project)](../build/reference/general-property-page-project.md).
38+
1. Open the project properties, and in the **Configuration Properties, General** section, notice the values of **Windows Target Platform Version**. Changing the value here has the same effect as following this procedure. See [General Property Page (Project)](../build/reference/general-property-page-project.md).
3639

3740
![Target Platform Version](../windows/media/retargetingwindowssdk3.PNG "RetargetingWindowsSDK3")
3841

39-
This action changes the values of project macros that include paths to header files and library files. To see what changed, in the **Visual C++ Directories** section of the **Project Properties** dialog, choose one of the properties such as the **Include Directories**, choose to open the dropdown list, and choose \<Edit>. The **Include Directories** dialog appears.
42+
This action changes the values of project macros that include paths to header files and library files. To see what changed, open the **Visual C++ Directories** section of the **Project Properties** dialog. Select one of the properties, such as **Include Directories**. Then, open the property value's dropdown list, and choose **\<Edit>**. The **Include Directories** dialog appears.
4043

4144
![Include Directories dialog box](../windows/media/retargetingwindowssdk4.PNG "RetargetingWindowsSDK4")
4245

4346
Choose the **Macros >>** button, and scroll down the list of macros to the Windows SDK macros to see all the new values.
4447

4548
![Windows SDK Macros](../windows/media/retargetingwindowssdk5.PNG "RetargetingWindowsSDK5")
4649

47-
5. Repeat for other projects, as needed, and rebuild the solution.
50+
1. Repeat for other solution projects, as needed, and rebuild the solution.
51+
52+
You can also *target*, or use, an earlier version of the SDK in a project. Open **Project** > **Properties**. Choose from the other SDK versions available on your computer in the **Windows SDK Version** dropdown.
4853

4954
### To target the Windows 8.1 SDK
5055

51-
1. Open the shortcut menu for the project node, and choose **Retarget SDK Version**.
56+
1. Open the shortcut menu for the project node in Solution Explorer, and choose **Retarget projects**. (In earlier versions of Visual Studio, choose **Retarget SDK Version**.)
5257

5358
2. In the **Target Platform Version** dropdown list, choose **8.1**.
5459

5560
## See also
5661

57-
[Windows Desktop Applications (Visual C++)](../windows/how-to-use-the-windows-10-sdk-in-a-windows-desktop-application.md)
62+
[Walkthrough: Create a traditional Windows Desktop application (C++)](../windows/walkthrough-creating-windows-desktop-applications-cpp.md)

0 commit comments

Comments
 (0)