admin管理员组

文章数量:1355836

When you have multiple NGENed copies of the same dll (in different versions) in your system, you will have multiple copies of the ngened version in your ngen folder e.g. C:\Windows\assembly\NativeImages_v4.0.30319_64\

It appears that if I launch one version of my application, then the runtime will open ALL the ni.dll files for ALL the versions of all the assemblies of my application? Looking at procmon or perfview I can see

FileOpenOrCreate C:\Windows\assembly\NativeImages_v4.0.30319_64\My.Dll\201a7c1daf8c4fdbee16491b0646f281\My.Dll.ni.dll FileOpenOrCreate C:\Windows\assembly\NativeImages_v4.0.30319_64\My.Dll\236cfbe44c678200128651bddf751e51\My.Dll.ni.dll

.. and so on, for as many versions as exist on the system. The problem this causes is when Antivirus on the system will intercept these calls and stall the Framework for 10-15ms for each FileOpenOrCreate. What causes this? Why can't the app use the checksum to identify exactly which ni.dll it needs?

本文标签: