Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application has failed to start ... application configuration is incorrect - VC++ 2005 Runtime Problem

We moved our Visual C++ 2003 solution to Visual 2005 and now we have problems deploying to clean XP machines.

Our solution has a DLL project and a command line executable which uses this DLL. Both projects create and embed manifest files.

Our installer also copies the VC8 CRT runtimes from the C:\Programme\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\ to the install dir.

When we install on a clean Windows XP, we see the error message "Application has failed to start ... application configuration is incorrect."

Putting the exe in Depends.exe, says:

Error: The Side-by-Side configuration information for "c:\program files\MySoftware\vc8\BENCHMARK.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: The Side-by-Side configuration information for "c:\program files\MySoftware\vc8\MYLIB-VC8.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Event viewer logs:

Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.

Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.

Generate Activation Context failed for C:\Program Files\MySoftware\vc8\Benchmark.exe. Reference error message: The operation completed successfully.

I've read copying the msvcp80.dll,msvcr80.dll,msvcm80.dll and Microsoft.VC80.CRT.manifest to application folder is sufficient.

What am I doing wrong ?

like image 561
Paul Baumer Avatar asked Nov 05 '08 15:11

Paul Baumer


1 Answers

Copying the CRT dlls around is not recommended. As Vinay says you should use the correct merge modules.

You can also use the redist install exe's if merge modules don't work with your installer technology:

  • VS2005 CRT
  • VS2005 SP1 CRT

As a last resort try copying the entire 'Microsoft.VC80.CRT' directory to your programs exe directory (not the contents, the actual directory).

like image 81
Rob Walker Avatar answered Nov 04 '22 13:11

Rob Walker