I am upgrading our codebase to C++17 via the v142 toolset offered by Visual Studio 2019. When running my program compiled with this toolset, the OS reports:
(program name).exe - System Error
The program can't start because api-ms-win-core-processenvironment-l1-2-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
OK
This is unexpected. The prior build used v140. Both builds use the 10.0.15063.0 SDK. WINVER is set to 0x0601 on the command line, as is _WIN32_WINNT, so I expect nothing untoward to happen. Running depends.exe to investigate dependencies yielded the following:
The pane on the right shows the result of building with v140, and the pane on the left shows the result of building with v142. As you can see, they're both bound to the same runtime, and the missing DLLs bind to nothing exotic: the first item is looking for GetCommandLineW
and GetCurrentDirectoryW
.