Search code examples
c++visual-studio-2008manifest64-bitdebug-build

"application configuration is incorrect" and "side-by-side configuration is incorrect" running VS2008 64-bit debug build


I am working on a 64-bit OS windows 7 ultimate machine VS2008 with 64bit addon.

I have successfully build my projects in both 32 & 64 bit, debug and release config. The 64 bit debug is not launching; it gives the error:

Unable to Start program xxx This application has failed to start because application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more retails see application event log.

I ran the dependency walker. From the redistibutable path C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT I added Microsoft.VC90.DebugCRT.manifest msvcm90d msvcp90d msvcr90d Microsoft.VC90.DebugOpenMP vcomp90d.sll in the bin\debug folder of my solution.

Finally dependency walker didnt have any yellow marks (missing files) left, but still it gave errors like:

Error: At least one required implicit or forwarded dependency was not found. Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Error: Modules with different CPU types were found. Error: The Side-by-Side configuration information in "e:\xyz.EXE" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001).

The 32 bit manifest says:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" **processorArchitecture="x86"** publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

Whereas the 64 bit debug manifest has:

 <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>

What I fail to understand is, why does the debug 32-bit build run successfully?

Please help me out as I have already checked many questions but have not found any feasible solution.


Solution

  • Thankyou for responding to my question. I have finally solved it and here is the solution:-

    Mine was a Qt based VC++ solution, the app depended on some 3rd party dlls & libs. My task was to provide 64bit support to my application for which I had build Qt and 3rd party dlls&libs in 64 bit OS.

    I got the CRT error when I tried runnig my app in debug 64 bit config. The error persisted even after I had copied the following CRTs to bin folder of my application

    redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT:

    1. Microsoft.VC90.DebugCRT.manifest
    2. msvcm90d.dll
    3. msvcp90d.dll
    4. msvcr90d.dll

    Microsoft.VC90.DebugOpenMP:

    1. vcomp90d.dll

    I was able to launch my app successfully in debug 64 bit mode when I pasted the above CRTs in the corresponding bin folders where Qt and 3rd party libraries were present.