2
votes

I've started using the dotnetzip from codeplex ... I Downloaded it and referencing Ionic.ZIP.dll in my .net 4.5 application, This is my main code...

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);
 }

this code works fine in a console c# application, but i'm receiving the next error when I want to run my SSIS script....

en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) en System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) en Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

Any Idea ?

1
It appears your error message is cut off. Do you have the whole stack trace? One thing: Even if you reference a DLL in your SSIS package, it is not deployed with it. You would have to put a copy of the DLL in the GAC on the server where the SSIS package is deployed. Secondly, the account executing the package will need access to "C:\destinationFolder".Cᴏʀʏ

1 Answers

0
votes

I think the issue is related to the DLL references, At runtime the SSIS package read the added assemblies from three locations by default:

  1. The Global Cache Assembly
  2. The .Net Framework folder
  3. The SQL Server DTS Assemblies folder

You can refer to the following link for more details (check both answers)