-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
Description
Every executable in the DSC package has a load time dependency on vcruntime140.dll, which it probably does not need. It works on most machines by virtue of other applications installing such DLL in system32. It will not work on a clean machine.
You can work around this by statically linking components of the C++ runtime, while still dynamically linking the C runtime. This is referred to as the "Hybrid CRT" model.
Here's how you do it in Rust:
...and here's how you do it in MSBuild/vcxproj:
A little more information is available in the WinAppSDK docs, but be aware that you do not need to consume WinAppSDK to use HybridCRT.