WinSCP .NET 程序集在安装到 SSIS 的 GAC 时抛出 "The winscp.exe executable was not found at location of the assembly"

WinSCP .NET assembly throwing "The winscp.exe executable was not found at location of the assembly" when installed to GAC for SSIS

我有一个包可以使用 WinSCP 从 FTP 下载文件,当我在本地执行它时 运行 非常完美。但是当我们从 SSIS 数据库目录的部署版本中 运行 时,我们面临着问题。 .dll 文件的 GAC 注册已经完成。

下面是我们得到的错误。

更新

Installing the WinSCP .NET assembly 上引用文档:

Installing

The package includes the assembly itself (winscpnet.dll) and a required dependency, WinSCP executable winscp.exe.

The binaries interact with each other and must be kept in the same folder for the assembly to work. In rare situations this is not possible (e.g. when installing the assembly to GAC), make use of the Session.ExecutablePath property to force the assembly to look for the winscp.exe in a different location.