Search This Blog

Saturday, November 14, 2015

Install to global assembly cache without gacutil

In Windows Server 2012 you can't install a DLL to the GAC by drag/drop, but you can do it using GACUTIL.exe.
GacUtil.exe is not present on the server by default.
You can do it using the following script instead of Gacutil.exe

In Windows 2012 you can use the following PowerShell to install dll to GAC

Set-location "c:\temp"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("c:\temp\test.dll")
iisreset

In Windows 2012 you can use the following PowerShell to remove dll from GAC:

Set-location "c:\temp"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacRemove("c:\temp\test.dll")
iisreset


No comments:

Post a Comment

Restricting Custom People Picker to only one Sharepoint group programatically

Refer the following script files in your page,     <!-- For People Picker -->     <script type="text/javascript" src...