I create a C++ Project with Visual Studio 2019 for Windows 8.1.
The used UCRT is from Windows Kits\10\Source\10.0.10240.0\ucrt.
But in this Version are some bugs.
How can I used a newer UCRT (SDK) for Windows 8.1 projects?
RetoFelix
I create a C++ Project with Visual Studio 2019 for Windows 8.1.
The used UCRT is from Windows Kits\10\Source\10.0.10240.0\ucrt.
But in this Version are some bugs.
How can I used a newer UCRT (SDK) for Windows 8.1 projects?
RetoFelix
Hi,
I suggest you could install the winsows sdk you need in the visual studio installer.
Visual Studio Installer -> modify -> Individual components -> SDKs,libraries and frameworks
You could choose download and install the SDK which you want.

And then you could choose the ucrt you want to use for your project. Right click the project-> Properties -> General -> Windows SDK Version

Best Regards,
Jeanine Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hi,
Thank You for your explanation.
But when I select legacy Toolset v141_xp the only available SDK is 7 and there is the UCRT from 10240 with some bugs.
I know XP is out of support. But in some situations, it is required.
Can I change the UCRT for v141_xp?
RetoFelix
Hi
If you want to configuring programs for Windows XP, you just use the Visual Studio 2017 v141_xp toolset.
For more details I suggest you could refer to the Doc: Configuring Programs for Windows XP
According to the Doc:
The UCRT is now a Windows component, and ships as part of Windows 10. The static library, DLL import library, and header files for the UCRT are now found in the Windows 10 SDK. When you install Visual C++, Visual Studio setup installs the subset of the Windows 10 SDK required to use the UCRT. You can use the UCRT on any version of Windows supported by Visual Studio 2015 and later versions. You can redistribute it using vcredist for supported versions of Windows other than Windows 10.
As I mentioned above, you could install the winsows sdk you need in the visual studio installer. Whether you have installed the winsows sdk you want in Individual components?

Best Regards,
Jeanine Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
HI
I know to build for Windows XP.
I have installed the following Toolset and the SDK 10.0.18362.0 for windows 10.

As soon as I select v141_xp as toolset and select apply the options are changed and only SDK 7.0 is available.
With SDK 7.0 the UCRT from Windows Kits\10\Source\10.0.10240.0\ucrt is used.
Normaly I link staticly to the CRT so no deploy of CRT is required.
But the static UCRT in 10.0.10240.0 has some bugs.
When I use the toolset v142 with SDK 10.0.18362.0 the UCRT from Windows Kits\10\Source\10.0.18362.0\ucrt is staticly linked and the bug is gone.
But then Windows XP is no longer supported.
So my question who can I use v141_xp toolset with a newer UCRT then 10.0.10240.0?
RetoFelix
According to your description, I checked it on my side and choose the Visual Studio 2017 - Windows XP (v141_xp)' for Platform Toolset and the Windows SDK Version auto changed to '7.0'. It seems that when you use the v141_xp as the toolset, you could only use SDK version 7.0. You couldn't use v141_xp toolset with a newer UCRT then 10.0.10240.0.
The UCRT is not intended to be used on any Windows version older than Vista. If you take a look at the system requirements listed here - Windows 10 Universal C Runtime and here - update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c you can see that XP is not supported. So when building for XP, the UCRT is not used. That's why the the SDK version is automatically set to 7.0.
Thank you for your answer.
So I must life with bugs in UCRT 10.0.10240.0 as long as build for XP is required.
RetoFelix
8 people are following this question.