8
votes

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.

4
Not a duplicate, but possibly related? Not sure if this will help at all: stackoverflow.com/questions/3803825/vc-crt-redist-problemNic Foster
Are you attempting to run the build on a different machine than you built it on? Usually the debug runtime is "not redistributable" which means that you can't run it on other machines without building merge modules and installing them on whatever machine you're trying to run the code on.Benj
@Nic - I don't think that question will help, that person was just missing the correct release runtime. The debug runtime is a pain... Usually building a "setup project" in VS handles the merge modules for you so that you can install them along with your binaries with a debug build.Benj
@Benj I am running/launching the exe from VS2008 enviornment itself. Its on the same machine where I have build it.Kashish

4 Answers

6
votes

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.

2
votes

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.

1
votes

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.

0
votes

Install VS2008 SP1 to fix this.

  • Before installing, make sure that the "64-bit compilers and tools" feature was selected when installing the Visual Studio proper. (If you install it after installing SP1, you will probably need to uninstall and reinstall the SP to get the fix.)

  • To check if you have the SxS entry installed, see if there are directories with the names like amd64_microsoft.vc90.debugcrt* in %WinDir%\WinSxS.


The reason is a bug in VS2008 installer. It only installs the 32-bit version of the DebugCRT into the <Windows>\WinSxS cache where all programs can find it. It does install the same DLLs under %ProgramFiles% but programs can't find them there.

While the feature containing the x64 DebugCRT shared assembly component is "advertized" rather than installed for some reason. This can be seen in installation logs that VS2008 setup leaves in %Temp% of the installing user by searching them for "DebugCRT". The same files are indeed present in c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist (as part of another component) but are not duplicated to WinSxS.

(By looking at vs_setup.msi contents wth Orca, the most probable direct cause seems to be that hidden feature entries lack the msidbFeatureAttributesFollowParent flag, which causes them to never be installed.)

Whatever is the cause, VS2008 SP1 fixes it. Its installation has a side effect: it also forcibly installs many other features that may or may not have been selected during VS2008 install (e.g. MFC/ATL runtimes) but compared to a broken installation, that is a much lesser inconvenience.