Wednesday, March 12, 2014

Update a DLL in GAC in a Windows 2012 server

Since .net framework 4.0, the gacutil location has been changed and in a windows sdk folder.
However, on a SharePoint 2013 production box, the windows SDK is not installed.
Here is the Powershell come to rescue.

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

$publish = New-Object System.EnterpriseServices.Internal.Publish

$publish.GacInstall("...you dll path");