4

If it's not which I almost sure in, then what's the role of mscorlib.dll and where CLR is situated?

Sergey
  • 11,548
  • 24
  • 76
  • 113

4 Answers4

3

CLR is not in mscorlib.dll but in MSCorEE.dll. I think that is what you were looking for. This is the main DLL loaded when an .NET exe assembly gets loaded.

See this question which probably answers you question.

Community
  • 1
  • 1
Aliostad
  • 80,612
  • 21
  • 160
  • 208
  • why does mscoree.dll goes by default on every Windows machine even if there's no .NET installed there? – Sergey Apr 06 '11 at 13:01
  • I think because .NET goes with every windows machine. Even XP comes with some version of .NET. – Aliostad Apr 06 '11 at 13:03
  • See:[CLR metadata myth in a managed module?](http://izlooite.blogspot.com/2009/09/what-is-clr-metadata-in-managed-module.html#more) When a managed module is invoked, the OS(windows) *thinks* that its just another **normal**(win32) exe; then it tells the windows loader to load the file; the loader reads the idata section, and when it finds the reference of `mscoree.dll`, it knows that it now needs to load the managed module in CLR; and then eventually managed module's IL is JIT'ted(Just in time compilation) into native code; which means, MSCorEE.dll compiles IL to native CPU instructions. – KMån Apr 06 '11 at 13:20
  • 2
    This isn't accurate, mscoree.dll is the default CLR host, the bootstrapper for the CLR for desktop apps. It is responsible for loading and initializing it with CorBindToRuntimeEx(). Other CLR hosts are SQL Server or ASP.NET. The CLR is stored in mscorwks.dll, clr.dll in 4.0 – Hans Passant Apr 06 '11 at 14:04
2

I believe this question covers most of what you're asking:

mscorlib.dll & System.dll

Community
  • 1
  • 1
Kieren Johnstone
  • 41,277
  • 16
  • 94
  • 144
0

mscorlib.dll is holding some fundamental classes of .net such as system.

use reflector to what classes and namespaces mscorlib.dll is carrying.

also your could find information on CLR here : http://msdn.microsoft.com/en-us/library/8bs2ecf4.aspx

tugberk
  • 57,477
  • 67
  • 243
  • 335
0

The actual CLR code is contained in a file whose name has changed with different versions of the CLR. For versions 1.0, 1.1, and 2.0, the CLR code is in a file called MSCorWks.dll, and for version 4.0, the CLR code is in a file called Clr.dll.

QrystaL
  • 4,886
  • 2
  • 24
  • 28