Fix Mysteriously Dying Windows Programs

(… in certain circumstances, at least.)

Symptom: a program seems to compile fine, but dies when run. No visible error message on the console, but the exit code is -1073741515.

Cause: MSVC install sometimes fails to install ucrtbased.dll in the right place! Most common solution on the internet is “uninstall and reinstall Visual Studio a few times until it appears”. WTF.

Workaround: Pretty sure this works:

copy "C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt\ucrtbased.dll"
  "C:\Windows\System32"

Although as far as I can tell, this is not an encouraged approach (surprise).

(Originally posted on Tumblr.)

Questions or comments? For better or worse this website isn’t interactive, so send me an email or, uh, Toot me.

To get notified of new posts, try subscribing to my lightweight newsletter or my RSS/Atom feed. No thirsty influencering — you get alerts about what I’m writing; I get warm fuzzies from knowing that someone’s reading!

See a list of all how-to guides.

On GitHub you can propose a revision to this guide or view its revision history.