2
votes

I have an ssis package in SQL Server 2016 which is using a custom dll that I have added in the gac. SSIS package works fine in visual studio but when I deploy it on SQL Server, it can not find the dll frm gac.

Can anyone help me where to place that custom dll?

I've added exception handling in my task script and saving the logs in a text file which says

System.IO.FileNotFoundException: Could not load file or assembly 'abc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

File name: 'abc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

at ST_7a052dcdad9e4fe18bb49852****.Job.runTask()
at ST_7a052dcdad9e4fe18bb49852****.ScriptMain.Main()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

1
Did you also deploy the DLL to the GAC on the production server?billinkc
yes i did, using gacutilUsman
Have u try to list out all GAC file with Cmd?BeiBei ZHU

1 Answers

0
votes

There is 2 possible causes:

  1. 32/64 bit conflict: Make sure that the mode you are running with is relevant to the dll version. Try running the package in 32-bit mode in SQL job:

  2. Copy the registered dll to the SQL assemblies path: %ProgramFiles%\Microsoft SQL Server\<SQL Version>\SDK\Assemblies and then register it to GAC. Also make sure that this is the path referenced in the package

Workaround

Using the AssemblyResolve Function: