views:

562

answers:

3

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.

A: 
selbie
then my program crashes, because i have a dll that uses the crt and i free stuff i receive from it.
CiNN
Where does that stuff come from? Using the dynamic debug CRT won't solve that problem unless the stuff was allocated from it to begin with.
sean e
just having 2 projects in the same solution, one is the exe the other the dll.
CiNN
both are using the same crt since they are compiled at the same time, both using Multi-threaded Debug DLL.
CiNN
One could argue that doing cross-binary malloc/free isn't desirable, but it happens on my projects too. ;) I think your best bet is to write a setup package that installs the MSIs for the debug CRTs as per hints above. Or shoot... just install the same version of Visual Studio on the machine that you need to debug on. Hope this helps!
selbie
+1  A: 

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.

sean e
tried the codeproject article but it doesn't seem to work, when i check to manifest i get two entries for the crt dll (the one the article is creating and the default one)
CiNN
A: 

I would suggest making a release build and trying that on the vanilla machine (along with the Microsoft Visual C++ 2008 Redistributable Package installed on that machine), and see if that works.

It is quite possible that your application also uses MFC and C++ DLLs that you might not have copied over. i.e. MFC90D.DLL, MSVCR90D.DLL, MSVCP90D.DLL

crashmstr