开发者

Why is Visual Studio 2005 Debug Mode not working?

开发者 https://www.devze.com 2022-12-17 10:53 出处:网络
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, when I try to run the debug mode, I am getting follow

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, 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.

When I checked my .exe using dependency walker, 开发者_开发技巧it says following .dll's missing:

msvcp80D.dll
msvcr80D.dll
IESHIMS.DLL
WER.DLL


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


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.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消