add a DLL to the GAC

U

udhayan

Hi,

I am migrating my SQL server environment from windows 2008R2 to new windows 2016 server.

For our SSIS packages to run, we need to add a dll to GAC and look like in windows 2016 server its not a straight forward approach.

I am using powershell as suggested in the web

Set-location "C:\tmp"
[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\mydll.dll")

Used below piece of code to get the details of my dll

([system.reflection.assembly]::loadfile("c:\temp\MyDLL.dll")).FullName

But the when i execute the powershell code to add dll, im getting below error ,

Exception calling "Load" with "1" argument(s): "Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=8d9cc7a568eed01e' or
one of its dependencies. The system cannot find the file specified."

Thanks in advance

Continue reading...
 
Back
Top Bottom