【问题标题】:Location and instances of mscoree.dll on Windows 7Windows 7 上 mscoree.dll 的位置和实例
【发布时间】:2015-01-12 11:51:55
【问题描述】:

几本书(Inside Windows Debugging [2012] by T. Soulami,Pro C# with .NET 3.0 by A. Troelsen)指定 mscoree.dll 的位置作为 system32 文件夹。但是,在我的 32 位 Windows 7 系统上,有 两个 mscoree.dll 文件实例,位于以下位置:

C:\Windows\winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_6.2.7600.16513_none_7daed23956119a9f
C:\Windows\winsxs\x86_netfx-mscoree_dll_31bf3856ad364e35_6.2.7601.17514_none_7f96335553371a30

此外,我的印象是(应该)只有一个版本的 .NET 可执行引导过程中使用了这个 shim DLL。

希望得到解释。

【问题讨论】:

    标签: .net debugging windows-7


    【解决方案1】:

    当然,这是 Windows 的一个隐藏得很好的实现细节,从 Vista 开始。您的 c:\windows\system32 目录的内容不是文件,它们是在并行缓存中引用文件的硬链接。在this blog post 中进行了很好的报道,标题恰如其分地“不要相信所有的眼睛告诉你”。

    您可以使用fsutil.exe 实用程序列出链接。在我的 Windows 8.1 机器上:

    C:\Windows\System32>fsutil hardlink list mscoree.dll
    \Windows\WinSxS\amd64_netfx-mscoree_dll_31bf3856ad364e35_6.3.9600.16384_none_a61e5c302a20ae78\mscoree.dll
    \Windows\System32\mscoree.dll
    

    您的并行缓存包含多个版本,因为您获得了 .NET 更新,可能通过 Windows 更新提供。它保留了旧文件,因此您可以卸载更新。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-29
      • 2016-01-13
      • 2012-01-12
      • 2011-09-02
      • 1970-01-01
      • 1970-01-01
      • 2011-11-25
      • 2023-03-30
      相关资源
      最近更新 更多