none
Not getting "x64 Debug" build configurations to run with VC++ 2008

    Question

  • I'm using visual studio 2008 professional with vista business x64.
    I would like to build native 64-bit applications but have run into some problems.

    At first I couldn't run any x64 program I compiled and not even the cl.exe for amd64 (64-bit native compiler).
    I installed the 64-bit development tools when I installed VC++ and after this I have also done a repair install of visual studio.
    I followed this guide to make the project compile for 64-bit.
    "How to: Configure Visual C++ Projects to Target 64-Bit Platforms"
    http://msdn2.microsoft.com/sv-se/library/9yb4317s(en-us).aspx

    After this I downloaded and installed the x64 version of the visual studio 2008 redist (vcredist_x64). Now I'am able to run the .exe I build with configuration "Release" for x64. But still not "Debug" (and I need the debug).
    I've verified with task manager that the "Release" really is 64-bit (it doesn't have the *32 suffix in it's name in the process list).
    Building Win32 Debug works fine.

    When I try to start a x64 Debug-built program I get a error complaining about the side-by-side configuration is incorrect. The application eventlog (eventvwr.msc) says this:

    Event ID 33, sidebyside

    Activation context generation failed for "H:\Visual Studio 2008\Projects\testx64\x64\Debug\testx64.exe". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

    I tried the sxstrace and got this:

    =================
    Begin Activation Context Generation.
    Input Parameter:
        Flags = 0
        ProcessorArchitecture = AMD64
        CultureFallBacks = en-US;en
        ManifestPath = H:\Visual Studio 2008\Projects\testx64\x64\Debug\testx64.exe
        AssemblyDirectory = H:\Visual Studio 2008\Projects\testx64\x64\Debug\
        Application Config File =
    -----------------
    INFO: Parsing Manifest File H:\Visual Studio 2008\Projects\testx64\x64\Debug\testx64.exe.
        INFO: Manifest Definition Identity is (null).
        INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
    INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
        INFO: Resolving reference for ProcessorArchitecture amd64.
            INFO: Resolving reference for culture Neutral.
                INFO: Applying Binding Policy.
                    INFO: No publisher policy found.
                    INFO: No binding policy redirect found.
                INFO: Begin assembly probing.
                    INFO: Did not find the assembly in WinSxS.
                    INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_64\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                    INFO: Attempt to probe manifest at H:\Visual Studio 2008\Projects\testx64\x64\Debug\Microsoft.VC90.DebugCRT.DLL.
                    INFO: Attempt to probe manifest at H:\Visual Studio 2008\Projects\testx64\x64\Debug\Microsoft.VC90.DebugCRT.MANIFEST.
                    INFO: Attempt to probe manifest at H:\Visual Studio 2008\Projects\testx64\x64\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
                    INFO: Attempt to probe manifest at H:\Visual Studio 2008\Projects\testx64\x64\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
                    INFO: Did not find manifest for culture Neutral.
                INFO: End assembly probing.
        ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
    ERROR: Activation Context generation failed.
    End Activation Context Generation.



    Edit:
    I compared my project setting with the sample projects provided with Visual Studio. I found a work-around for this problem (but not a perfect solution). In the project property page under "Configuration Properties --> C/C++ --> Code Generation" I changed "Runtime Library" from "Multi-threaded Debug DLL (/MDd)" to "Multi-threaded Debug (/MTd)".
    Seems that the runtime for debugging isn't installed. I haven't installed the platform SDK, just plain Visual Studio 2008 so maybe the aren't installed.
    Sunday, March 2, 2008 12:18 PM

Answers

  • Hi,

     

    Vcredist_x64 just contains the 64-bit release version of VC++ runtime library; it doesn’t contain the debug version of VC++ runtime library. Thus, to make your debug version application run on the target machine, you can either switch the Runtime library option from /MDd to /MTd during compilation or copy the debug version VC++ runtime library to the deployed machine. You can find the debug version VC++ runtime library in the “redist” subdirectory of your VC++ installed directory.

     

    Thanks!

     

    Friday, March 7, 2008 8:06 AM

All replies

  • Hi,

     

    Vcredist_x64 just contains the 64-bit release version of VC++ runtime library; it doesn’t contain the debug version of VC++ runtime library. Thus, to make your debug version application run on the target machine, you can either switch the Runtime library option from /MDd to /MTd during compilation or copy the debug version VC++ runtime library to the deployed machine. You can find the debug version VC++ runtime library in the “redist” subdirectory of your VC++ installed directory.

     

    Thanks!

     

    Friday, March 7, 2008 8:06 AM
  • SideBySide errors are typically caused by the current Microsoft Visual C++ version not being backward compatible with the application that failed. The Event ID 33 error message is typically: Activation context generation failed for “program name”..Please use sxstrace.exe for detailed diagnosis. There are other similar SideBySide errors with the same problem of backward compatibility. If the software works OK then you don't have to fix it but if it does not or you want to get rid of this error here are two Fixes:


    1) Reinstall or Repair (preferred if an option) the application. Often the installation package will have the version of Microsoft Visual C++ that it uses and will install it.


    2) Try to figure out what Microsoft Visual C++ Redistributable Package version (available versions are: 2003, 2005, 2008, & 2010) the application needs (most likely the one that came out prior to the date that the application software was created; check the dates of the files in the package). . These are available through Microsoft's Downloads.

    Worse comes to worse you can just try installing a previous version to see if it works, if not then try the one before that. Though I don't like it, you can have multiple versions of Microsoft  on your computer and most people do because various install programs will install the one that they like.

    • Proposed as answer by JSiepmann Wednesday, July 27, 2011 10:50 PM
    Wednesday, July 27, 2011 10:50 PM