When running Windows applications, the CLR is always silently serving. How exactly does the CLR get loaded and run?
First, Microsoft specifically defines a standard COM interface for the CLR.
Installing a version of. NET FRAMEWORK,CLR is included in the DLL and is registered as a COM server in the Windows registry.
Multiple versions of the CLR may be installed on a single computer. Open the Developer command prompt and enter CLRVer.exe to see the version of the CLR installed on your current PC.
For example, in the C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder, the CLR is included in the Mscorwks.dll; C:\Windows\Microsoft.NET\Framework \v4.0.30319 folder, the CLR is included in the Clr.dll.
When you double-click an application, start a standalone Windows process, and in the latest version of the. Net Folder there is a MSCoreEE.dll-like component that reads the. NET version of the application and then loads the corresponding CLR version into the process. In summary, the CLR is hosted in-process.
Can there be several CLR versions in a process?
Starting with. NET 4.0, you can load multiple versions of the CLR in one process without causing compatibility issues.
When did the CLR unload?
The CLR can be unloaded only when the process is terminated.
The CLR loads all the assemblies in the mscorlib.
The CLR loads the managed heap.
The CLR loads the application domain, and it can load more than one application domain, which is the one that is set to "Startup Project" by default.
Running multiple threads within an application domain, some threads are the main thread, and some are worker threads.
How the CLR is loaded and works