R – Testing a visual c exe on a test vanilla machine don’t start

debuggingruntimevisual-studio-2008windows

This Application has failed to start
because the application configuration
is incorrect. Reinstalling the
application may fix this problem.

This is what I get when i try my debug file on a system without visual studio installed.
I tried to copy the Debug_NonRedist\x86\Microsoft.VC90.DebugCRT in the same folder as my exe, with no luck.

  • dll in Microsoft.VC90.DebugCRT folder in exe folder.
  • dll in same exe folder and dll.

I have installed "Microsoft Visual C++ 2008 Redistributable Package" too.

Best Answer

The debug CRT is not distributable. The "Microsoft Visual C++ 2008 Redistributable Package" does not include the debug CRT. The application has an automatically generated manifest that is telling the OS to load the debug CRT from the SxS system.

See this CodeProject article for ways to use a private assembly so that your app uses the debug CRT dlls that you manually copy over to the other system.