views:

358

answers:

5

I am opening a visual studio 2005 solution file and building it in release and debug mode. while I am able to run the application in release mode. but when I try to run the debug mode, I am getting following error:

"Unable to start program XXXX.exe". "This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log."

Any idea what could go wrong.

Thanks for your help.

when I checked my exe using dependency walker, it says following dll's missing: msvcp80D.dll msvcr80D.dll IESHIMS.DLL WER.DLL

A: 

Check your configuration settings and project properties. If they look good try cleaning the solution and performing a rebuild. Reload the files from source control. If all that fails try rebuilding the project from scratch in another instance of Visual Studio and then copy in / associate the files with your new project.

VS is the best source editing tool I know but still isn't flawless.

Hardryv
A: 

Since you are able to build Release, I don't think installing patch would be useful.

Is this project created by you or part of broader project? Reason to ask is broader project typically use property sheets to configure settings. What are the libraries that you are linking against? It is possible that you have debug version of any library/dll that is causing problem.

Start program from within IDE, if you have any path related issues (e.g. wrong dll being loaded etc.) that can be verified. Typically starting from within IDE will always work but starting from command shell may have some path issues.

Ketan
dependency walker says my debug exe is missing following dlls:msvcp80D.dll msvcr80D.dll IESHIMS.DLL WER.DLLBut I dont know how to get these dlls
+1  A: 

Download and install Microsoft Visual C++ 2008 Redistributable Package.

can be downloaded here: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

AndreiM
Also check which icon you see in the Dependency Walker near the missing dll filename, if it is with hourglasses then ignore this DLL it is loaded on demand, which is not your case.
AndreiM
A: 

Are you attempting to run the Debug build on the machine with Visual Studio, or a different machine?

If you've linked your program with the DLL version of the C++ runtimes (MSVCP80D.DLL, etc.), then the debug runtime files will not be available on a different machine. They're not included in the Visual C++ 2005 redistributable, nor are they (the debug DLLs) actually redistributable, according to the Visual Studio licensing.

If it's the same machine as Visual Studio, then you probably need to repair your Visual Studio installation. If it's a different machine, you're (barring jumping through some hoops) out of luck.

Roger Lipscombe
+1  A: 

The cause of the problem is that you've linked dynamically against the microsoft runtime libraries. If you have then taken your dll to another machine and tried to run it, then if the runtime libraries happen to be there (typically because a program you've previously installed has installed them) then your program will run. If these don't exist then installing the Visual C++ 2008 redistributable package (as linked to in AndreiM's answer) will do the trick.

For the debug build there is no redistributable package and so (in general) it will only run on a machine that has the debug libraries that are part of the developer tools. There are two options: either create a simple installer package which will pick up these dependencies and install them on the target system, or modify your project configurations to make them link statically to the runtime libraries (ie use the 'Debug Multithreaded' rather than 'Debug Multithreaded Dll' runtimes). If you've statically linked then you won't need the runtime libraries at all.

the_mandrill