. NET100 Q (. NET Framework Foundation)

Source: Internet
Author: User

1.. NET operating mechanism

1.1. NET program is compiled into what form of code?

. NET program forms the CLR header, meta data, and intermediate code after the first compilation. When implemented or deployed, the second compilation will result in the creation of executable machine code in the CLR.

How does the 1.2 JIT work?

JIT (Real-time compilation) engine before compiling the intermediate code, will look for the method's native machine code cache and determine whether it is available, if available directly loaded, if not available, the JIT engine looks for the method stub in the type, find the intermediate code and compile.

1.3 Briefly describes the loading mechanism of the Assembly

The CLR actively loads the assembly through System.Reflection.Assembly.LoadForm and System.Reflection.Assemblty.Load. The former passes the location and the latter identifies the assembly by uniquely identifying four elements that strongly name the assembly. The CLR's loading mechanism is consistent with the Load method, and its intrinsic strategy is to find the assembly in turn through version policy, codebase location, application domain location, and application location.

2. How do I configure the version policy for an assembly?

The CLR supports setting a version policy at 3 levels, followed by application policy, publisher policy, and computer policy. All policy settings are implemented by modifying the configuration file. The 3-level policy is executed sequentially by the CLR, and the result of the previous policy is entered as the next policy. The publisher policy is for only those assemblies that are placed in the GAC (global assembly Cache) and can be specified in the application policy to be ignored.

3. Build, deploy, and manage (*)

3.1 How do I generate a strongly signed assembly?

After a strong-signed assembly requires a public/private key pair, you can control the compiler's input parameters to get a strong signed assembly. For C # compiler csc.exe, the/keyfile parameter can be used to make use of that public/private key file.

3.2 How to put an assembly into the GAC

The GAC is a folder with a specific directory structure, and all strongly signed assemblies can be placed in the GAC. You can simply drag to add an assembly to the GAC through the. NET Framework's Assembly Viewer, or you can use a command line to add it using tools such as Gacutil.exe. In short, any method is based on the GAC's specifications and the assembly itself's characteristics, in the GAC directory under the corresponding subdirectory structure.

3.3 Delay signature and its effect

Delay signing is the delay of encrypting private keys and digital signatures of strong signed assemblies to actual release. Delayed signing improves the efficiency of the development testing phase and facilitates the organization and project team to manage their own private keys.

3.4 The version of the assembly is divided into which parts

The version number of an assembly is divided into four parts: the major version number, this version number, the build number, and the modification number.

  

. NET100 Q (. NET Framework Foundation)

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.