ARM64 programs built with Visual Studio crash with 0xC000007B

It’s because Visual Studio seems to copy an x86 version of the VC++ runtime into system32 on ARM64 systems. That’ll make it crash with a bad image format error. If you copy the ARM64 version of vcruntime140.dll (for me, found in C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.28.29325\arm64\Microsoft.VC142.CRT) into the build directory, binaries will work.

One thought on “ARM64 programs built with Visual Studio crash with 0xC000007B

  1. Dirk December 21, 2022 / 5:35 pm

    Two-year anniversary! Visual Studio 2022 (17.4.3) on ARM64 now works with Release builds, but fails with Debug builds. It seems that the vcruntime DLLs work fine, but now ucrtbased.dll is broken. Here is a path to get the debug DLL: `C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\arm64\ucrt\ucrtbased.dll“` . Copy into the build directory to try; copy to `C:\Windows\System32` to fix all programs.

Leave a Reply

Your email address will not be published. Required fields are marked *