This application has failed to start because the application configuration is incorrect.

October 13th, 2009 12 Commented

Lately, I wrote a BitTorrent application using Visual Studio 2008 (VS2008) express. When I tested it on different machines, I got an error message box (see below message).

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I’m sure this problem had been an issue for most of us (programmers) who use VS2005 and VS2008. This issue is due to the missing manifest file which is required by Windows XP. This file contains metadata that describes side-by-side assemblies and side-by-side assembly dependencies.

There are two solutions to this problem.

The first solution is to make a static linking. However, this will make the executable file bigger.

  1. Open up the project’s Properties
  2. Change the Runtime Library property under C/C++ -> Code Generation property page from Multi-threaded DLL (/MD) to Multi-threaded (/MT).
  3. Recompile the application.

The second solution is to copy the manifest and DLL files and place it in the folder where the executable file resides. This solution is pretty good for performing quick test.

  1. Copy the DLL and manifest files from your Microsoft Visual Studio folder, for example
    …\Microsoft Visual Studio 8\VC\redist\x86\…
    to the local folder.
  2. You might want to check your application using DependencyWalker to know what DLLs are needed.

The third solution is to install the vcredist_<x86 or x64 or ia64>.exe depending on the operating system. This is the proper solution to ensure the dependencies are all installed.

  1. Microsoft Visual C++ 2005 Redistributable Package
    Package (x86) – {A49F249F-0C91-497F-86DF-B2585E8E76B7}
    Package (x64) – {6E8E85E8-CE4B-4FF5-91F7-04999C9FAE6A}
    Package (ia64) – {03ED71EA-F531-4927-AABD-1C31BCE8E187}

  2. Microsoft Visual C++ 2005 SP1 Redistributable Package
    Package (x86) – {7299052B-02A4-4627-81F2-1818DA5D550D}
    Package (x64) – {071C9B48-7C32-4621-A0AC-3F809523288F}
    Package (ia64) – {0F8FB34E-675E-42ED-850B-29D98C2ECE08}

  3. Microsoft Visual C++ 2005 SP1 ATL Security Update Redistributable Package
    Package (x86) – {837B34E3-7C30-493C-8F6A-2B0F04E2912C}
    Package (x64) – {6CE5BAE9-D3CA-4B99-891A-1DC6C118A5FC}
    Package (ia64) – {85025851-A784-46D8-950D-05CB3CA43A13}

  4. Microsoft Visual C++ 2008 Redistributable Package
    Package (x86) – {FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}
    Package (x64) – {350AA351-21FA-3270-8B7A-835434E766AD}
    Package (ia64) – {2B547B43-DB50-3139-9EBE-37D419E0F5FA}

  5. Microsoft Visual C++ 2008 SP1 Redistributable Package
    (x86) Package – {9A25302D-30C0-39D9-BD6F-21E6EC160475}
    (x64) Package – {8220EEFE-38CD-377E-8595-13398D740ACE}
    (ia64) Package – {5827ECE1-AEB0-328E-B813-6FC68622C1F9}

  6. Microsoft Visual C++ 2008 SP1 Redistributable Package ATL Security Update
    (x86) Package – {1F1C2DFC-2D24-3E06-BCB8-725134ADF989}
    (x64) Package – {4B6C7001-C7D6-3710-913E-5BC23FCE91E6}
    (ia64) Package – {977AD349-C2A8-39DD-9273-285C08987C7B}

, , ,

12 responses to “This application has failed to start because the application configuration is incorrect.”

  1. Demon says:

    I try the first method , after I changed Multi-threaded DLL (/MD) to Multi-threaded (/MT),another probelm happened ,the phenonmenon as follow:
    fatal error c1189:#error: Please use the /MD switch for _AFXDLL builds.
    Do yo know how to solve this problem?

    • softz says:

      You are using MFC right? If so, you have to also change the Use of MFC under General property page from Use MFC in a Shared DLL to Use MFC in a Shared Library. That will eliminate the _AFXDLL builds error.

      • Demon says:

        I cannot find the selection of “Use MFC in a Shared Library”,and I have tried to use all the selection under the Use of MFC,but the compile cannot pass.
        By the way ,I use the release mode.

        • softz says:

          You can find the property here. Make sure is set to static library for the MFC (unless you are not using MFC at all).

          • Demon says:

            Thanks for your information!
            Now I have solved the problem after I installed three files as follow:

          • softz says:

            Ok, that is exactly like step 2, providing the systems with the DLL dependencies which comes with the vcredist. However, you’d need to do the same with every computer that going to use your application. So, you may need to handle that in your installation apps.

            As for the step one, every needed functions are compiled into the exe and hence, you don’t need those file. But probably, you left out some library which needed to be static (like MFC if since you are using AFXDLL preprocessor def) and that’s why /MD didn’t work.

            But again, glad to hear that you solve the problem. cheers.

  2. Puneet says:


    I am getting same error but my scenario is little bit different. I build my application (exe) using VS 2008 and i using a static ibrary which build using VS 2005. So, i am having two manifest entry of VS2005 and VS2008 for my final executable.

    I can’t change my scenario. Any information may be useful.

    Thanks in advance

    • softz says:

      Hi, have you installed all the SPs and security updates (for VS2005 and VS2008)?

      • Puneet says:

        Yes. Security Updates of both VS 2005 and VS 2008 are installed. And i also make sure that Run time of same should also be installed like ATL securtiy update of VS2005 also.

        • softz says:

          Since you have installed all of them,
          1. I presume you’re running the Release version,
          2. did you check with Dependency Walker to identify the missing dll?

          Theoretically, if all the required DLLs are there, you should have no problem starting up the application.

          However, if you encountered crashing, then it’d probably due to mismatch of CRTs. Alternatively, you might want to try “not embed manifest” within your application.

          • Puneet says:

            I am using release version and no DLL is missing. I have one executable which is having dependancy of MSVCR80.dll as well as MSVCR90.dll. I means to say, same application (one exe) has dependancy on both MSVCR80.dll and MSVCR90.dll. And my manifest file is shown like this

            Any help will be usefull.

          • softz says:

            Ok, it’s quite unusual and I can’t visualize the problem from the descriptions. I can take a look at it for you if you don’t mind sending me the executable. (my email address can be found at the bottom of the page)

            Edited: Is the static library compiled with /MT or /MD. It sounds like a /MD to me.

Leave a Reply

6 − six =