Install DLL to GAC

06/10/2015 10:06

Powershell script to install dll into GAC, instead of using gacutil.exe 


$dllLocation = "G:\mytfsproject\Debug\MyProject.dll";
  
 Set-location (Split-Path $dllLocation -Parent)
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")           
$publish = New-Object System.EnterpriseServices.Internal.Publish           
$publish.GacInstall($dllLocation)           
iisreset