Install DLL to GAC without Visual Studio

I was working on one SSIS project, everything was good till published to production server.

I was using Newtonsoft.Json in one of package and dll must installed to GAC, unfortunately production server don’t have Visual Studio. Therefore I cannot use gacutil.exe tool

Finally, I found Powershell can register dll to GAC as well.

[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:\Users\admin\Desktop\Newtonsoft.Json.dll”)