Error message when you try to run a Visual C++ application: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem"

Article translations Article translations
Article ID: 948854 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

When you run a Visual C++ executable file or DLL that contains embedded debug information, the application does not start. Additionally, you receive the following error message:
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.
This problem occurs if the Microsoft Visual C++ Redistributable Package (VCRedist.exe) has been used to deploy Visual C++ DLLs on the computer.

CAUSE

This issue occurs when one of the following conditions is true:
  • The VCRedist.exe file that is installed is for a different version of Visual C++.
  • The VCRedist.exe file did not install the debug build of Visual C++ DLLs on the computer.

RESOLUTION

To resolve this issue, you can use the Dependency Walker tool to document all the DLLs that a Visual C++ application uses. To do this, use the following methods in the order that they are presented.

Method 1: Install the Dependency Walker tool

The Dependency Walker tool is part of the Windows Support Tools. The Support Tools are not installed with the Windows operating system. Instead, you must install them separately from the \Support\Tools folder of the Windows operating system CD. To install Windows Support Tools, see the "Install Windows Support Tools" section of the following Microsoft Web site:
http://technet2.microsoft.com/windowsserver/en/library/baa79cdd-83b0-4f10-9356-b2d14462d5b21033.mspx?mfr=true

Method 2: Determine which DLLs the application depends on

To determine which DLLs the application depends on, use the Dependency Walker tool to scan the Visual C++ application. To do this, follow these steps:
  1. In Windows Explorer, locate the application and any DLLs that the application requires.
  2. Right-click the application, and then click View Dependencies.
Dependency Walker scans the application and builds a hierarchical tree that lists all the dependencies that the application has. One of the dependencies is the debug version of the C run-time libraries (CRT) that are being used, such as the Msvcr80d.dll file.

Method 3: Copy dependent DLL files

If an older version of the debug version of the CRT is installed, or if the files are not present on the computer, you must provide copies of the debug version of the CRT that was used to build the Visual C++ application. To do this, follow these steps:
  1. On the development computer, locate the debug version of the CRT. This version is located in the following Visual Studio folder:
    ..\VC\redist\Debug_NonRedist
  2. Copy the necessary DLL file assemblies from this folder.
  3. On the computer on which you want to run the application, copy the DLL file assemblies into a folder that has the same name and path under the folder for the Visual C++ application.
Important The debug version of the CRT DLLs are not redistributable. We do not recommend that you deploy these to end-users for a released deployment of the application. For more information about redistributable files, see the Redist.txt file in the root folder of your Visual Studio installation.

Properties

Article ID: 948854 - Last Review: May 28, 2008 - Revision: 2.1
APPLIES TO
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual Studio 2005 Express Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Team Suite
  • Microsoft Visual C++ 2008 Express Edition
  • Microsoft Visual Studio 2008 Academic Edition
  • Microsoft Visual Studio 2008 Professional Edition
  • Microsoft Visual Studio 2008 Standard Edition
  • Microsoft Visual Studio Team System 2008 Team Suite
Keywords: 
kbdevsicnvrtkb KB948854

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com