Reputation: 1804
I'm trying to use DotNetZip library from powershell.
I downloaded DotNetZip and extracted the Tools folder (containing the Ionic.Zip.dll
) to C:\Files
.
All I need is to extract a splitted .zip file, however, when I try to use [System.Reflection.Assembly]::LoadFrom("C:\Files\Ionic.Zip.dll")
I get an error:
Could not load file or assembly file:///C:\Files\Ionic.Zip.dll' or one of its dependencies. Operation is not supported
.
How can I do it?
Thanks
Upvotes: 0
Views: 900
Reputation: 1804
Here's the solution:
For security reason, all of the dlls were blocked, that is why powershell said that "the operation is not supported" , I managed to unblock the dlls by going to the properties menu of each dll and then press "Unblock" (on the "General" tab).
Please note that the button seems to disappear after clicking it so I guess once you unblocked a dll you can't block it again that easily.
It is also important to run the Powershell script as admin.
Upvotes: 1