Creating a reference to a custom assembly from an SSIS Script Task - vb

前端 未结 2 1138
暖寄归人
暖寄归人 2021-01-19 03:42

I am looking for a way to create an \"Imports Newtonsoft.Json.Linq\" in my SSIS script task, but this is apparently not as simple as a \"manage NuGet Packages\" in SSIS. So

相关标签:
2条回答
  • 2021-01-19 04:36

    You have to add Newtonsoft.Json dll file to the following directories

    (1) .Net Framework dll directory

     C:\Windows\Microsoft.NET\Framework\v[.net installed version]\ 
    

    example

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\
    

    (2) SQL server data tools dll runtime directory

    C:\Program Files (x86)\Microsoft SQL Server\[SQL Server version]\DTS\Binn
    

    example

    C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn
    

    After that, in the Script Task, go to project explorer, you and then add this dll as a reference, it will appear in the references listed.

    0 讨论(0)
  • 2021-01-19 04:45

    Not Possible.

    If you add any third party library(.dll) file, the SSIS will run inside the visual studio(local). So, in local it will work fine (while running in Visual Studio). But once you run it through the SQL Server Job/ETL, it will not.

    The only way is you need to add your third party library/libraries in "GACUTIL" of the server where your SSIS is running(through SQL-JOB/ETL...).

    As you have mentioned, you are using "Newtonsoft.Json", so, copy the Newtonsoft.Json.dll to the server (gacutil) where SSIS package is running.

    Try this and let me know if you face any issues

    0 讨论(0)
提交回复
热议问题