none
Missing msvcr90.dll at runtime on x86, not x64

    Question

  • I am trying to do the porting of a plugin for an older tierce application to a newer version of it, in both architectures x64 and x86. My porting to x64 works fine. I got issues with the x86 architecture.

    The plugin I develop is more or less a DLL packaged in a proprietary format. I could compile it. My problem is at runtime.

    When I launch the tierce application with the plugin installed, Windows is complaining about the missing msvcr90.dll. After opening my Process Explorer and browsing through the DLLs loaded by the application, I can see this dll. The load path is the following one:

    C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57

    The DLL is present at this path (with msvcp90.dll and msvcm90.dll). I do not know a lot about side-by-side libraries, but I have heard about it.

    I thought the issue could come from the manifest of my DLL. It was embedded in the previous version of my plugin that worked (on an older version of the tierce application, architecture x86). I tried to unembed it. Here is the content:

    <?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>
    </assembly>
    

    The Windows OS I am running on is a x64 OS. I tried the same plugin on a x86 Windows, and the application/plugin starts without this issue at runtime.

    I tried installing Microsoft Visual C++ 2008 SP1 Redistributable Package (x86), with no success.

    I am developping the plugin on a Visual C++ 2012 (not sure if it matters).

    I tried looking in System32 folder, and the dll is not present. It's not present in SysWOW64 neither.

    If I copy this msvcr90.dll from its winsxs location to System32SysWOW64 or even the root folder of the application, I get another issue:

    "R6034: An application has made an attempt to load the C runtime library incorrectly."

    In this case, I can see in the Process Explorer that the application is trying to load msvcr90.dlltwice.

    Is there any workaround? Maybe if I change the manifest, add some dependency somewhere? I just need to make the plugin start on the x64 machine to debug the x86 plugin (because it's the dev machine). Running the x86 (respectively x64) plugin on a x86(respectively x64) machine works fine for production (apparently).

    Any tip would be greatly appreciated.

    Monday, November 23, 2015 12:51 PM