Reputation:
I'm trying to load EPPlus.dll
.NET assembly, from the EPPlus CodePlex project, into PowerShell ISE version 4.0 on a Windows 7 Service Pack 1 computer, by using the Add-Type
cmdlet with the -Path
parameter. Pretty simple, right?
I'm receiving the following error:
Add-Type : Could not load file or assembly 'file:///c:\path\to\epplus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).
When I load the same .NET assembly using:
[System.Reflection.Assembly]::LoadFrom("c:\path\to\epplus.dll")
... it works just fine. Any ideas why I'd be getting the above error?
Note: I unblocked the files, after extracting them using the built-in Windows ZIP utility.
Upvotes: 0
Views: 1323