【发布时间】:2016-06-24 02:00:21
【问题描述】:
将 SQL Server 2016 (13.0.15000.23) 和 SSIS 与带有最新 SSDT 的 VS 2015 社区一起使用
我有一个带有 1 个脚本任务的简单 SSIS 测试包。
在该任务中,我只是添加了对 Renci.sshnet (2014.4.6.0) 的引用,它是一个 .NET 4.0 DLL。
我将项目目标框架更改为 4.0
可以进行基本调用以创建连接:
Console.WriteLine("Start");
Renci.SshNet.ConnectionInfo ConnNfo = new
Renci.SshNet.ConnectionInfo("hostOrIP", 22, "username",
new AuthenticationMethod[]{
// Pasword based Authentication
new PasswordAuthenticationMethod("username","password"),
// Key Based Authentication (using keys in OpenSSH Format)
new PrivateKeyAuthenticationMethod("username",new PrivateKeyFile[]{
new PrivateKeyFile(@"..\openssh.key","passphrase")
}),
}
);
当我立即运行它时,会得到一个 DTS 脚本任务:运行时错误 “调用的目标已抛出异常。”
我已经获取了代码并从中制作了一个独立的控制台应用程序。即使是 4.5,它也运行良好。
这整个事情在具有 Sql Server 2008R2 的旧服务器中使用完全相同的代码运行良好
我在新配置中遗漏了一些东西。每当我引用和使用 renci.sshnet 时它都不会运行
我也尝试在 writeline 上设置一个断点,但它没有让我到达那里..在我到达它之前它失败了..
有什么想法吗?我没有选择。
提前致谢。
-肯
【问题讨论】:
标签: ssis sql-server-2016 ssh.net