unmanaged.dll.manifest 文件有什么用途?

发布于 2024-07-10 02:50:10 字数 1279 浏览 4 评论 0原文

我观察到 unmanaged.dll 文件具有 unmanagement.dll.manifest 文件标记。 在编辑器中打开此文件时,它似乎是正常的 XML,带有指向某些其他依赖管理的链接? 组件。 这似乎是最近的变化……不记得之前见过它们。

  • 为什么需要这些文件? (如果我必须猜测的话,那就是加载依赖的托管程序集和/或 CLR)
  • 这些文件还可以包含哪些其他有用的信息? 它们是否也包含指向依赖的非托管 dll 的任何链接(这会很好)

<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>

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖树树初阳… 2024-07-17 02:50:10

您所看到的称为“并排程序集” (SxS)。 Microsoft 已将 .NET 并行机制扩展到非托管 DLL,现在将其称为“平台程序集”。 现在,DLL 不是通过 DLL 名称执行链接,而是通过清单加载。 .NET GAC 的等效项是文件夹 \windows\WinSxS; 这允许在一个系统上同时安装多个版本的 DLL,并且不同的应用程序可以绑定同一 DLL 的不同版本。 它还包括 .NET 提供的重定向功能; 这主要是清单的作用(允许重定向)。

清单中引用的 DLL(例如 Microsoft.VC90.DebugCRT)也是非托管的(即本机代码)。

应用程序清单也有其他用途。 我不知道细节,但记得 XP 中主题的选择也在清单中指示。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文