How the CLR is loaded and works

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.