none
VS2008: binding to earlier version of VCLIB

    Question

  • My VS2008's VCLIB has been updated to the latest version of 9.0.30729.6161. Now I need to make a build of binaries for a target PC having the VCLIB version 9.0.30729.4148 only in WinSxS.

    All of my C++ projects have the _BIND_TO_CURRENT_VCLIBS_VERSION=1 defined (unfortunately this setting must not be changed).

    I also manually modify the mfcassem.h, crtassem.h etc. and replace the _CRT_ASSEMBLY_VERSION (and the rest) from 9.0.30729.6161 to 9.0.30729.4148.

    Then build all the projects ...

    However, those built binaries still bind to 9.0.30729.6161 of dlls (observed it loading those version of CRT dlls etc. in the debug output window).

    Inspecting one of the projects' generated ~.embed.manifest and ~.intermediate.manifest, there are duplicate entries, one set for 9.0.30729.4148, and one set for 9.0.30729.6161:

    <?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.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.30729.4148" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC" version="9.0.30729.4148" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC" version="9.0.30729.6161" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.30729.6161" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
    </assembly>

    What step(s) am I still missing?


    -- tfs2

    Wednesday, March 14, 2012 6:22 PM

All replies