After porting some of my programs from VS2015 to VS2017 in noticed that the binaries no longer run on Windows 7 or Windows XP - even though they have been compiled with v141_xp
toolset. The program fails to start with missing DLL api-ms-win-core-rtlsupport-l1-2-0.dll
(note the 2).
I'm well aware that those api-ms-win-*
DLL's belong to the UCRT and that, starting with VS2015, I have to redistribute the UCRT DLL's from the Windows 10 SDK (to be found at Redist\ucrt\DLLs
in the Windows 10 SDK directory), along with my application - just redistributing the vcruntime140.dll
and msvcp140.dll
is not sufficient. But there is only api-ms-win-core-rtlsupport-l1-1-0.dll
in my Windows SDK directory, but not api-ms-win-core-rtlsupport-l1-2-0.dll
. I just downloaded and re-installed the latest Windows SDK (10.0.15063), just to be sure. Still the DLL in question is absent!
I also tried installing the VS2017 Redistributable package on the Windows 7 (or XP) machine via VC_redist.x86.exe
- latest version downloaded from Visual Studio web-site (14.11.25325). Obviously that copies the api-ms-win-*
DLL's into the "System32" directory. But, again, only api-ms-win-core-rtlsupport-l1-1-0.dll
, but not api-ms-win-core-rtlsupport-l1-2-0.dll
. App still won't start.
[EDIT]
This of course only applies if I link against the DLL runtime (/MD
). If I link against the "static" runtime (/MT
) I get a binary that has no DLL dependencies on UCRT and runs fine on Windows 7 and XP.
[EDIT #2]
Please refer to my other post (including EDIT) for the resolution of the mess:
https://stackoverflow.com/a/45773325/1766377
v141_xp
toolset in my project configuration - which exists specifically to target Windows XP. In VS2015, using thev140_xp
toolset works great to create binaries for Windows XP - as long as I redistributevcruntime140.dll
andmsvcp140.dll
as well as theapi-ms-win-*
UCRT DLL's from the Windows 10 SDK. But it appears that VS2017 now is linking against a newer UCRT version, for which the required redistributables are not (yet) available - neither in the Windows 10 SDK nor via the VS2017 redistributable installer - which seems like a bug to me... – MuldeRv141'_xp
toolset is selected), but apparently fails to do so! Or, more specifically, it appears that M$ missed to provide the right redistributable DLL's for those platforms in its current Windows SDK. – MuldeR