Add/Remove RadControls to the Global Assembly Cache
Installation and deployment > Deploying RadControls for ASP.NET AJAX > Add/Remove RadControls to the Global Assembly Cache
Glossary Item Box
Add to Global Assembly Cache
There are two ways to add a control to the Global Assembly Cache (GAC):
Automatic
1. Go to Start -> Settings -> Control Panel -> Administrative Tools -> Microsoft .NET Framework 2.0 Configuration
2. Expand the nodes and locate Assembly cache
3. Right-click on it and select Add:
Microsoft .NET 2.0 Configuration panel
4. Browse to the Telerik bin directory and ctrl-highlight the needed DLL's (the demo and DictionaryConfiguration DLLs are not needed).
5. Click Open.
Manual
1. Run the .NET command prompt (Start -> Programs -> Microsoft VS.NET -> VS.NET Tools -> VS.NET prompt) and start the gacutil.exe tool with -i parameter (install) and the name of the control, e.g.
[VS prompt] Copy Code
gacutil.exe -i "C:\Program Files\Telerik\RadControls for ASPNET AJAX\Bin\Telerik.Web.UI.dll"
You may also directly copy the dll files to the "\WINDOWS\assembly" (or "\WINNT\assembly") folder of your server - this is equivalent to the effect of the gacutil.exe utility.
2. Change the machine.config file of the server and add a reference to the assembly in the GAC. The machine.config file is the configuration file for all web applications on the server. It is located at: "\WINDOWS\Microsoft.NET\Framework\[Framework Version]\CONFIG". It is similar in to the web.config file, but the web.config only works for the web application, in which it resides.
Locate the
[machine.config] Copy Code
To get the information that goes into the assembly attribute (version, culture, PublicKeyToken), you can run the gacutil /l command, which will return a list of all the assemblies in the GAC. You will have to look for the one you just added and copy the assembly name, version, culture and publickeytoken.
For example the following command:
[VS prompt] Copy Code
gacutil -l Telerik.Web.UI
will return:
[VS prompt] Copy Code
Telerik.Web.UI, Version=[Assembly.Version], Culture=neutral,
PublicKeyToken=121fae78165ba3d4, processorArchitecture=x86
so the correct entry in the machine.config should be:
[machine.config] Copy Code
After that you should be able to use the control in all the application on the server without having to copy it to the "bin" folder of each web-application.
Remove from Global Assembly Cache
In order to remove Telerik RadControls for ASP.NET AJAX from GAC, please use the following command:
[VS prompt] Copy Code
gacutil.exe -u Telerik.Web.UI
No comments:
Post a Comment