I’ve blogged before on how to Easily add a dll to the GAC, but that involves two instances of Windows Explorer and the mouse.It would be quicker and easier to use the command line to update a dll in the GAC.If you have never used before, you can find out everything you ever wanted to know but were afraid to ask here: .Unfortunately, if you do not have the Windows SDK loaded on your development machine, you will need to install it to use gacutil, but it is relatively quick and painless, and the framework tools are very useful.
Each application still has to reference the assembly in order to use it, it does not matter whether from its own Bin folder, or from the GAC. Let’s start, however, with a more basic task – recognizing a GAC reference (assuming you already have some of the Telerik. UI assemblies installed in the GAC, I’ve chosen one of the older versions for this example): Here is an example with two of our Rad Controls assemblies for a Web Site type of project: An easy approach is to use the Property Pages dialog where you can manage the references: Here is another way to tell: Yes, this is in the web.config file of your website. What you need to keep in mind is that such a reference requires the fully qualified assembly name in order to work. Let’s take the visual approach first: Now, for some explanations to go with the images: For a Web Site project just add the above reference in the web.config.
To get information on the the assembly attributes (Version, Culture, Public Key Token), run the gacutil /l command which will return a list of all the assemblies in the GAC.
You can also see the information associated with a particular assembly using the -l parameter.
To get round this I knocked up a quick utility which will remove an existing version of a dll from the GAC and then install the latest version.
The code is: You can then use it by passing it the dll you want as a command line parameter e.g.