locked
Microsoft.VC80.DebugCRT issue with VS 2008 and x64 machine RRS feed

  • Question

  • Hi,

    I have a C++ program which is using a C program dll (lets call it "mydll"). It used to work fine on Win XP machine with VS 2005, but now I have ported it to Win7 and VS 2008.

    And it fails to run. It keeps breaking at line:

    LoadLibrary(mydll);

    On running the GetLastError() I see the error code as 14001.

    I looked deeper into it and found that during the generation of the "mydll", the manifest file that is generated creates the following dependency:

      <dependency>
        <dependentAssembly>
          <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
        </dependentAssembly>
      </dependency>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.4053' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
        </dependentAssembly>
      </dependency>

     

    After running the sxstrace command I found the log file showing the following error:

        ERROR: Cannot resolve reference Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".

     

    It seems like I need to install a particular Redistributable Package of VC++.

    Can some one please tell me which package do I need to install?

    This is my current configuration:

    OS: Win7 x64

    Visual Studio 2008 Version 9.0.21022.8 RTM

    Thanks.



    Monday, June 20, 2011 10:39 PM

Answers

  • You can use dependency walker utility for understand missing DLL's. I think, your application is looking for debug version of MFC dependency files.

    C:\RCHHEDA_SMART_CRON\Smart\datastore\smvirtual.dll


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    • Marked as answer by lucy-liu Thursday, June 30, 2011 6:58 AM
    Wednesday, June 22, 2011 1:30 AM
  • The Debug version files available in C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugMFC location and add in your manifest file.
    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    • Marked as answer by lucy-liu Thursday, June 30, 2011 6:58 AM
    Wednesday, June 22, 2011 6:31 AM

All replies

  • If you are running your application on Windows 7 X64 mode which build in X64 target, you have to install the following X64 SP1 redistributable package

    http://www.microsoft.com/download/en/details.aspx?id=2092

    Note: The manifest file should change to processorArchitecture = X64 and type="win64"

     

     

     

    If you are building your application with X86 (32 bit mode) which run on top of WOW64 layer you have to install X86 SP1 redistributable package

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5582

     

     


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    Tuesday, June 21, 2011 5:37 AM
  • I tried that, but the error still persists.
    Tuesday, June 21, 2011 7:06 PM
  • I checked the Winsxs folder, it has the following sub folder in it:

    C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d

    which has 3 files:

    msvcm80.dll

    msvcp80.dll

    msvcr80.dll

    So it looks like I have the dll's that it needs, but I dont understand why it is giving me the 14001 Error then.

    Tuesday, June 21, 2011 11:02 PM
  • Running the sxstrace command led to the following result:

    =================
    Begin Activation Context Generation.
    Input Parameter:
        Flags = 0
        ProcessorArchitecture = Wow32
        CultureFallBacks = en-US;en
        ManifestPath = C:\RCHHEDA_SMART_CRON\Smart\datastore\smvirtual.dll
        AssemblyDirectory = C:\RCHHEDA_SMART_CRON\Smart\datastore\
        Application Config File =
    -----------------
    INFO: Parsing Manifest File C:\RCHHEDA_SMART_CRON\Smart\datastore\smvirtual.dll.
        INFO: Manifest Definition Identity is (null).
        INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
        INFO: Reference: Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053"
    INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
        INFO: Resolving reference for ProcessorArchitecture WOW64.
            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_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                    INFO: Did not find manifest for culture Neutral.
                INFO: End assembly probing.
        INFO: Resolving reference for ProcessorArchitecture x86.
            INFO: Resolving reference for culture Neutral.
                INFO: Applying Binding Policy.
                    INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.9.0.microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_3c8576a8f974f0b8.manifest
                    INFO: Publisher Policy redirected assembly version.
                    INFO: Post policy assembly identity is Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
                INFO: Begin assembly probing.
                    INFO: Attempt to probe manifest at C:\Windows\WinSxS\manifests\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2.manifest.
                    INFO: Manifest found at C:\Windows\WinSxS\manifests\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2.manifest.
                INFO: End assembly probing.
    INFO: Resolving reference Microsoft.VC90.DebugCRT.mui,language="&#x2a;",processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
        INFO: Resolving reference for ProcessorArchitecture WOW64.
            INFO: Resolving reference for culture en-US.
                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_32\Microsoft.VC90.DebugCRT.mui\9.0.21022.8_en-US_1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.mui.DLL.
                    INFO: Did not find manifest for culture en-US.
                INFO: End assembly probing.
            INFO: Resolving reference for culture en.
                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_32\Microsoft.VC90.DebugCRT.mui\9.0.21022.8_en_1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.mui.DLL.
                    INFO: Did not find manifest for culture en.
                INFO: End assembly probing.
        INFO: Resolving reference for ProcessorArchitecture x86.
            INFO: Resolving reference for culture en-US.
                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_32\Microsoft.VC90.DebugCRT.mui\9.0.21022.8_en-US_1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.mui.DLL.
                    INFO: Did not find manifest for culture en-US.
                INFO: End assembly probing.
            INFO: Resolving reference for culture en.
                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_32\Microsoft.VC90.DebugCRT.mui\9.0.21022.8_en_1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.mui.DLL.
                    INFO: Did not find manifest for culture en.
                INFO: End assembly probing.
    INFO: Resolving reference Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
        INFO: Resolving reference for ProcessorArchitecture WOW64.
            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_32\Microsoft.VC80.DebugCRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.DebugCRT.DLL.
                    INFO: Did not find manifest for culture Neutral.
                INFO: End assembly probing.
        INFO: Resolving reference for ProcessorArchitecture x86.
            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_32\Microsoft.VC80.DebugCRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.DebugCRT.DLL.
                    INFO: Attempt to probe manifest at C:\RCHHEDA_SMART_CRON\Smart\datastore\Microsoft.VC80.DebugCRT.DLL.
                    INFO: Attempt to probe manifest at C:\RCHHEDA_SMART_CRON\Smart\datastore\Microsoft.VC80.DebugCRT.MANIFEST.
                    INFO: Attempt to probe manifest at C:\RCHHEDA_SMART_CRON\Smart\datastore\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.DLL.
                    INFO: Attempt to probe manifest at C:\RCHHEDA_SMART_CRON\Smart\datastore\Microsoft.VC80.DebugCRT\Microsoft.VC80.DebugCRT.MANIFEST.
                    INFO: Did not find manifest for culture Neutral.
                INFO: End assembly probing.
        ERROR: Cannot resolve reference Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
    ERROR: Activation Context generation failed.
    End Activation Context Generation.


    Tuesday, June 21, 2011 11:15 PM
  • You can use dependency walker utility for understand missing DLL's. I think, your application is looking for debug version of MFC dependency files.

    C:\RCHHEDA_SMART_CRON\Smart\datastore\smvirtual.dll


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    • Marked as answer by lucy-liu Thursday, June 30, 2011 6:58 AM
    Wednesday, June 22, 2011 1:30 AM
  • The Debug version files available in C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugMFC location and add in your manifest file.
    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    • Marked as answer by lucy-liu Thursday, June 30, 2011 6:58 AM
    Wednesday, June 22, 2011 6:31 AM
  • I'm having the same problem.

    As far as I understand, the Studio is looking for DEBUG versions of these DLLs, i.e. msvcp80d.dll and msvcr80d.dll. And that package, you have just installed, doesn't have them (only RELEASE versions). Studio 9 (2008) has its own debug DLLs - look in folder x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb for example. 

    I cannot find DEBUG versions as well.

    What is really bathers me is that I cannot start Release version.

    Wednesday, June 29, 2011 10:51 PM
  • I'm having the same problem.

    As far as I understand, the Studio is looking for DEBUG versions of these DLLs, i.e. msvcp80d.dll and msvcr80d.dll. And that package, you have just installed, doesn't have them (only RELEASE versions). Studio 9 (2008) has its own debug DLLs - look in folder x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb for example. 

    I cannot find DEBUG versions as well.

    What is really bathers me is that I cannot start Release version.

    You should not deploy or redistribute debug version of msvcp80d.dll and msvcr80d.dll files. You should take care about your link with release version and deploy on relase version of application along with release version of redistribute ex x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb . 

     

    C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugMFC

     


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    • Proposed as answer by ArvindKumarCS Thursday, May 22, 2014 9:16 AM
    • Unproposed as answer by ArvindKumarCS Thursday, May 22, 2014 9:16 AM
    Thursday, June 30, 2011 6:11 AM
  • I was facing the same problem, i tried lot of options with goggling but doesn't work. Finally I publish my code in release mode then deployed that service on WIN 2008 64bit environment and start working.

    Try with this option as well, if others doesn't work.

     
    Thursday, May 22, 2014 9:21 AM