So, I want to use a DotNetZip DLL from resource I already loaded it and specified type I created an instance of it , then I used the instance to read the password locked zip file and extract it using the password specified
Assembly dllassembly = Assembly.Load(block);
Type type = dllassembly.GetType("Ionic.Zip.ZipFile");
dynamic instance = Activator.CreateInstance(type);
using (dynamic zip = instance.Read(@"C:\Users\user\Desktop\output\archive.zip"))
{
zip.Password = "123";
zip.ExtractAll(@"C:\Users\user\Desktop\output\");
}
I get the following error :
Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Member 'Ionic.Zip.ZipFile.Read(string)' cannot be accessed with an instance reference; qualify it with a type name instead
I tried loading the DLL using appdomain but I don t know how I use the dll after.