Add-Type failure loading EPPlus.dll

0

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.

.net
powershell
asked on Stack Overflow Mar 31, 2014 by Trevor Sullivan

1 Answer

1

Run shell as administrator (elevated prompt)?

answered on Stack Overflow Apr 1, 2014 by Raf

User contributions licensed under CC BY-SA 3.0