我们应该添加到 UWF 写入过滤器例外列表的所有 NGen 项目的列表是什么?

What is the list of all NGen artifacts that we should add to our UWF write filter exceptions list?

我知道 Ngen 将其程序集放在 C:\windows\assembly\NativesImages_* 中。但我也知道它会跟踪每个程序集的引用,因此如果 B 和 C 依赖于 A,则卸载 B 不会卸载 A。这让我得出结论,NGen 至少使用另一个位置来跟踪引用计数和任何其他相关元数据,我说得对吗?

问题是我得到 "Ngen error because Mscorlib.dll does not have a native image" 但没有任何优化。

因此,如我所料,NGen 使用 Windows 注册表进行簿记。添加以下异常解决了我的问题:

uwfmgr registry add-exclusion "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework"
uwfmgr registry add-exclusion "HKEY_LOCAL_MACHINE\SOTWARE\Microsoft\Net Framework Setup"