Copy the DLL from GAC

Source: Internet
Author: User

In projects, we often introduce third-party DLL files. 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 generallyC: \ windows \ Assembly \This directory contains some special class library DLL installed and registered on the local machine, users are not allowed to directly perform operations on the elements (such as copying, cutting, pasting, and modifying names ), 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, 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. Use the Dir command to view the content, as shown in.

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 and it will be OK!

tips : if the file name or directory name to be entered is too long when you use commands in cmd mode, you can press a part of the characters first, and then use the tab key to automatically complete. The windows command tool will automatically find the matching content for you!

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.