Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 498
Kashish Avatar asked Jan 24 '12 06:01

Kashish


3 Answers

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.

like image 176
Kashish Avatar answered Sep 20 '22 15:09

Kashish


I had the same issue after adding a manifest for "Privilege elevation" to my Delphi console application (32bits, issue when it ran on Win7 x64). The issue was related to a dependency mentioned in the manifest file:

<dependency>
<dependentAssembly>
  <assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    publicKeyToken="6595b64144ccf1df"
    language="*"
    processorArchitecture="*"/>
</dependentAssembly>
</dependency>

When I removed it from the manifest, the Side by Side error disappeared.

like image 35
MrTheV Avatar answered Sep 20 '22 15:09

MrTheV


Depends is not great with side-by-side dependencies because it can often make it look like the dll is found when actually a slightly different version was required.

You can use sxstrace.exe to get a better idea of what's missing:

http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx

The event log usually shows side-by-side errors but sadly these don't give you much information other than that you have a problem.

like image 24
Benj Avatar answered Sep 22 '22 15:09

Benj