Specific steps: Introduce a third-party DLL in the project. Generally, we can copy the required DLL files to a place on the hard disk and add references to the project. This operation is very simple! But sometimes we will encounter such a situation, that is, the DLL to be referenced is in the GAC of the target machine, then we cannot manually copy it out.
In fact, Windows GAC has a corresponding directory, which is generally c: \ windows \ Assembly \. This directory has some special features, it stores the installed and registered class library DLL on the local machine, and does not allow users to directly perform operations on the elements (such as copying, cutting, pasting, and modifying the name ), however, you can directly drag the DLL file in another location to this directory for DLL installation, but we cannot directly copy the installed DLL. Here I will introduce a method to complete this operation.
First, we switch to the command line mode of windows, that is, start-run-cmd-press enter, and then go to the directory where GAC is located, and use the Dir command to view the content.
It seems that you can understand the directory structure in GAC. Basically, we can distinguish the Dir type based on the processor architecture column in the GAC directory, for example, the system we are looking. web. extensions belongs to msil. In cmd mode, it should correspond to gac_msil, switch to this directory, and Dir.
The system. Web. ExtensionsProgramSet, it is also a dir, continue to switch in and Dir.
At this time, there is only one directory, continue to switch in, And then dir will be able to see the DLL file we finally want, and then copy it through the Copy command to be OK
TIPS: when using commands in cmd mode, if the file name or directory name to be entered is too long, you can first knock some characters and then use the tab key to automatically complete, the Windows command tool will automatically find the matching content for you!