logo
line
HOME
TOOLS
ON MY MIND RIGHT NOW
MISC
ABOUT
line
forest

Visual Studio 2005 Problems and Solutions

Problem:
When running a program compiled with Visual Studio 2005 one of the following error messages appears: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem" or "The system cannot execute the specified program".

Cause and solution:
This problem occurs when a program compiled with Visual Studio 2005 is run on a computer without Visual Studio 2005 installed. One solution is to distribute necessary files from "C:\Program Files\Microsoft Visual Studio 8\VC\redist\" together with the program. Another solution is to change the linking of the runtime library. In the project properties go to Configuration Properties - C/C++ - Code Generation - Runtime Library. Change the setting from Multi-threaded DLL (/MD) to Multi-threaded (/MT) and then rebuild the project.

Problem:
When running a program compiled with Visual Studio 2005, some Win32 API calls fail without apparent reason.

Cause and solution:
This problem occurs with Win32 API calls that take text strings as parameters because the project default is to link against the Unicode version of the API (for example LoadLibraryW instead of LoadLibraryA). To solve the problem, open the project properties dialog. From there expand Configuration Properties, select General, and change Character Set from "Use Unicode Character Set" to "Use Multi-Byte Character Set".
© Arne Vidstrom. All rights reserved.