November 28, 2009

How to register a .Net assembly into GAC in a development environment

This article focuses on ways to register .Net assembly into GAC in a development / build environment and NOT applicable for deployment hence should NOT be bundled with the installer.
1. Using Gobal Assembly Cache Tool (gacutil.exe)
  • gacutil allows you to view and manipulate Global Assembly Cache.
  • GACUTIL doesn't come with the .NET Runtime, but with the .NET SDK - also a free download, but not part of the basic redistributable. So it should NOT be used for deployment.
  • Regiser -> Use the property variable to invoke gacutil.exe
    Syntax - gacutil.exe -i
  • UnRegister -> Use the property variable to invoke gacutil.exe
    Syntax - gacutil -u
2. You can also install your assembly into GAC, just by copy it into C:\WINDOWS\Assembly directory in explorer.
3. You can also use System.EnterpriseServices.Internal.Publish.GacInstall to register assembly into GAC.

Click Here to read more on how to register a .Net assembly into GAC using InstallShield or RegAsm.exe

1 comment:

  1. Welcome to the worl of blogging.
    I have added your page in favorites list.

    WISH YOU HAPPY BLOGGING.

    Regards,
    Praveena

    ReplyDelete