views:

1744

answers:

1

I observe unmanaged.dll files having a unmanaged.dll.manifest file tagging along. On opening this files in an editor, it seems to be normal XML with links to certain other dependent managed? assemblies. This seems to be like a recent change.. don't remember seeing them earlier.

  • Why are these files needed? (If I had to make a guess, it would be to load dependent managed assemblies and/or the CLR)
  • What other useful information can these files contain? Would they contain any links to dependent unmanaged dlls too (which would be nice)

.

<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.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>
+2  A: 

What you are seeing is called "Side-by-side assemblies" (SxS). Microsoft has extended the .NET side-by-side machinery to unmanaged DLLs, and now calls them "platform assemblies". Rather than performing linkage by DLL name, DLLs are now loaded through the manifest. The equivalent of the .NET GAC is the folder \windows\WinSxS; this allows simultaneous installation of multiple versions of the DLL on one system, and different applications binding against different versions of the same DLL. It also includes the redirection capabilities that .NET offers; this is primarily what the manifests do (allowing redirection).

The DLLs referred to in the manifest (e.g. Microsoft.VC90.DebugCRT) are also unmanaged (i.e. native code)

Application manifests serve other purposes as well. I don't know the details, but recall that selection of themes in XP is also indicated in manifests.

Martin v. Löwis