SSIS C# 2012 Script Task referring WinSCPnet.dll fails when run from SQL Server Agent with “Exception has been thrown by the target of an invocation”

后端 未结 3 1553
囚心锁ツ
囚心锁ツ 2020-12-19 15:38

I have an SSIS package (created in VS 2013) that contains a C# 2012 Script Task.

The job of the script task is to download a file from an SFTP server using WinSCP .N

3条回答
  •  执笔经年
    2020-12-19 16:23

    If you have already registered the appropriate Dll's are are still getting this error, and you are passing in variables that are package-scoped, be sure to add them to the "ReadOnlyVariables" in the script task.

    Right click on the task and click "Edit...", then click the "..." on the "ReadOnlyVariables" property, and add the variables that are referenced in your script.

提交回复
热议问题