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

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im 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 couldnt 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 Iam able to run the .exe I build with configuration "Release" for x64. But still not "Debug" (and I need the debug).
Ive verified with task manager that the "Release" really is 64-bit (it doesnt have the *32 suffix in its 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:

<span style="font-style:italic Event ID 33, sidebyside<br style="font-style:italic <br style="font-style:italic <span style="font-style:italic Activation context generation failed for "H:Visual Studio 2008Projectstestx64x64Debugtestx64.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:

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



<span style="font-weight:bold <font size=4><span style="font-family:Arial Edit:
</font>
<div style="text-align:left <font size=4><span style="font-family:Arial <font size=2><span style="font-family:Arial 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 <span style="font-weight:bold DLL (/MDd)" to "Multi-threaded Debug (/MTd)".
Seems that the runtime for debugging isnt installed. I havent installed the platform SDK, just plain Visual Studio 2008 so maybe the arent installed.
</font></font><span style="font-weight:bold <font size=4><span style="font-family:Arial </font> <span style="font-style:italic

View the full article
 
Back
Top