Home / Community & Support / Knowledge Base / RadControls for WinForms / General and Installation / Adding a control to the GAC (Global Assembly Cache) for WinForms

Adding a control to the GAC (Global Assembly Cache) for WinForms

Article Info

Rating: 2

Article information

Article relates to

 RadControls for WinForms

Created by

 Nikolay Diyanov, Telerik

Last modified

 Apr 03, 2008

Last modified by

 Nikolay Diyanov, Telerik



HOW TO
Add a control to the GAC (Global Assembly Cache)

SOLUTION
To install a control to the GAC, you need to 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 full path to the control's DLL.

For example:

gacutil.exe -i "C:\Program Files\Telerik\RadControls for WinForms Q3 2007 SP1\bin\TelerikCommon.dll"
gacutil.exe -i "C:\Program Files\Telerik\RadControls for WinForms Q3 2007 SP1\bin\Telerik.WinControls.dll"

You may also directly copy the dll files to the C:\WINDOWS\assembly, by drag and drop operation - this is equivalent to running the gacutil.exe utility.

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 can also see the information associated with a particular assembly using the -l parameter.

For example:

gacutil -l TelerikCommon

The command above will return:

TelerikCommon, Version=5.0.3.0, Culture=neutral, PublicKeyToken=5bb2a467cbec79, processorArchitecture=MSIL

Comments

  • Ching-Yen , Apr 6, 2008

    Hi, I am sorry, I am really new to the GAC. According to MSDN, we need to add the snk to the AssemblyInfo.vb Which is something like this Assembly: AssemblyKeyFile("C:\GACDemo\GACKey.snk"). So, wondering, how can we include the assembly attribute to the AssemblyInfo.vb ? Or we do not need to do anything but just run the gacutil.exe ?

  • Telerik Admin , Apr 23, 2008

    Ching-Yen, I can suggest you to include strong –name assembly signing by using build in capabilities of MS Visual Studio instead adding AssemblyKeyFile delegate in your AssamblyInfo.vb file. You could access this option through the Project Properties -> Signing tab -> Sign the assembly check box. Please find more information in this MSDN article: http://msdn2.microsoft.com/en-us/library/ms247123(VS.80).aspx

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.