Sql server 尝试使用DotnetZip运行SSIS脚本时出错
我已经开始使用codeplex的dotnetzip。。。 我下载了它并在.net 4.5应用程序中引用了Ionic.ZIP.dll, 这是我的主要代码Sql server 尝试使用DotnetZip运行SSIS脚本时出错,sql-server,ssis,etl,dotnetzip,script-task,Sql Server,Ssis,Etl,Dotnetzip,Script Task,我已经开始使用codeplex的dotnetzip。。。 我下载了它并在.net 4.5应用程序中引用了Ionic.ZIP.dll, 这是我的主要代码 using (ZipFile archive = new ZipFile(@"C:\Folder\ZipFileName.zip")) { archive.Password = "passwprd"; archive.Encryption = EncryptionAlgorithm.PkzipWeak; archive.S
using (ZipFile archive = new ZipFile(@"C:\Folder\ZipFileName.zip"))
{
archive.Password = "passwprd";
archive.Encryption = EncryptionAlgorithm.PkzipWeak;
archive.StatusMessageTextWriter = Console.Out;
archive.ExtractAll(@"C:\destinationFolder", ExtractExistingFileAction.Throw);
}
这段代码在控制台c#应用程序中运行良好,但当我想运行SSIS脚本时,我收到了下一个错误
en System.RuntimeMethodHandle.InvokeMethod(对象目标,对象[]参数,签名符号,布尔构造函数)en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(对象obj,对象[]参数,对象[]参数)en System.Reflection.RuntimeMethodInfo.Invoke(对象obj,BindingFlags invokeAttr,绑定器,对象[])参数,CultureInfo culture)en System.RuntimeType.InvokeMber(字符串名称,BindingFlags BindingFlags,Binder Binder,对象目标,对象[]提供的参数,参数修改器[]修饰符,CultureInfo culture,字符串[]namedParams)en Microsoft.SqlServer.Dts.Tasks.ScriptTask.VStatasksscriptingEngine.ExecuteScript()
有什么想法吗?我认为问题与DLL引用有关,在运行时,SSIS包默认从三个位置读取添加的程序集: