GAC DLL

Register dll in GAC without using gacutil

Usually we register the dll to the Global Assembly Cache a.k.a GAC using the Visual Studio developer console Gacutil or earlier to Windows server 2012 you can simply drag and drop to the Windows Assembly folder

With the Windows server 2012 drag and drop the file to the assembly folder will no longer work

In this scenario developer can use Powershell

To add DLL to the Global Assembly Cache

Run the powershell

PS C:\Users\Vignesh> [System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)

GAC    Version        Location
—    ——-        ——–
True   v4.0.30319     C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50…

PS C:\Users\Vignesh> $publish = New-Object System.EnterpriseServices.Internal.Publish
PS C:\Users\Vignesh> $publish.GacInstall(“C:\Users\Vignesh\bin\asvignesh.dll”);

To remove DLL from the Global Assembly Cache (Unregister)

Run the powershell

PS C:\Users\Vignesh> [System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)

GAC    Version        Location
—    ——-        ——–
True   v4.0.30319     C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50…

PS C:\Users\Vignesh> $publish = New-Object System.EnterpriseServices.Internal.Publish
PS C:\Users\Vignesh> $publish.GacRemove(“C:\Users\Vignesh\bin\asvignesh.dll”);

Default image
Vignesh A Sathiyanantham
AWS Certified developer with 8 years of extensive experience working for Cloud and Datacenter solutions and leading a small team in a lean startup based on Bangalore, India

One comment

  1. I have noticed you don’t monetize your page, don’t waste your traffic, you can earn additional
    bucks every month because you’ve got high quality content.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.