Reputation: 5264
Couple of books (Inside Windows Debugging [2012] by T. Soulami, Pro C# with .NET 3.0 by A. Troelsen) specify the location of mscoree.dll as being the system32 folder. However, on my 32 bit Windows 7 system, there are two instances of the mscoree.dll file, in the following locations:
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
Furthermore, I was under the impression that there is (should be) only one version of this shim DLL used in the .NET executable bootstrap process.
Would appreciate an explanation.
Upvotes: 4
Views: 5782
Reputation: 941635
Sure, this is a well-hidden implementation detail of Windows, starting at Vista. The content of your c:\windows\system32 directory are not files, they are hard links that reference files in the side-by-side cache. Covered pretty well in this blog post, aptly titled "Don't trust all your eyes tell you".
You can list the links with the fsutil.exe
utility. On my Windows 8.1 machine:
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
Your side-by-side cache contains more than one version because you got a .NET update, probably delivered through Windows Update. It keeps the old file around so you can uninstall the update.
Upvotes: 5