azureautomation/azure-automation-ise-addon

Operation is not supported. (Exception from HRESULT: 0x80131515) when running Install-AzureAutomationIseAddOn

Closed this issue · 11 comments

Seeing that error when running Install-AzureAutomationIseAddOn

Tried loading the assembly manually and same error on 2 seperate machines. Is this a bug or we missing another dependency somewhere?

PS C:\WINDOWS\System32\WindowsPowerShell\v1.0> add-type -path "C:\windows\system32\windowspowershell\v1.0\Modules\AzureAutomationAuthoringToolkit\ISEaddon\AzureAutomation.dll"
add-type : Could not load file or assembly
'file:///C:\windows\system32\windowspowershell\v1.0\Modules\AzureAutomationAuthoringToolkit\ISEaddon\AzureAutomation.dll' or one of
its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1

  • add-type -path "C:\windows\system32\windowspowershell\v1.0\Modules\AzureAutomati ...
  • - CategoryInfo          : NotSpecified: (:) [Add-Type], FileLoadException
    - FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand
    

@mattduguid This hasn't been released yet. Hold tight for a while.

Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell

@mattduguid are you using the latest version of the module? I believe I fixed that issue in a commit made around 1pm today

@alstab yeah I tried with the latest and that the error
@pcgeek86 cool will wait for it

@alstab I tried to refactor your addition to the module a little bit, maybe
I broke it by accident?

On Thu, Jun 25, 2015 at 3:52 PM, Matt Duguid notifications@github.com
wrote:

@alstab https://github.com/alstab yeah I tried with the latest and that
the error
@pcgeek86 https://github.com/pcgeek86 cool will wait for it


Reply to this email directly or view it on GitHub
#1 (comment)
.

Joe Levy
Duke University '12, Computer Science
www.jodoglevy.com
919.886.6563

Interesting @jodoglevy ,even with the newest code I can't repro. I'm following up with @mattduguid in an email thread and will try to resolve there.

By the way, here's how I have manually resolved this issue in the past: the error occurs because the dll is being blocked. If you right-click on the dll and click Properties, then in the General tab, you should see a note at the bottom about the block, along with an option to “unblock” the dll. Then, installation should work fine.

Maybe its working fine for you now because you already unblocked the file
in the past? Maybe try deleting the project and repulling?

On Thu, Jun 25, 2015 at 6:04 PM, alstab notifications@github.com wrote:

By the way, here's how I have manually resolved this issue in the past:
the error occurs because the dll is being blocked. If you right-click on
the dll and click Properties, then in the General tab, you should see a
note at the bottom about the block, along with an option to “unblock” the
dll. Then, installation should work fine.


Reply to this email directly or view it on GitHub
#1 (comment)
.

I had checked for blocked/read only and both were good, will repull soon and test

Pulled latest and same issue, worth noting I get this on 2 very separate machines. The one in this screenshot is a work Windows 7 build, the other is a home Windows 10 TP build. I get the same error if I try to add the assembly manually.
error

Looks like I'm missing a few other dependencies,
depends

I can confirm this as working now, building locally vs just extracting the .zip appears to be the fix.

Just adding a little texture to this solution. Its there here on this page.. but the answer might not be evident. If you have downloaded a ZIP or an self-extracting EXE and the DLL you are trying to load from one of its sub-folders is causing this issue, then ALL you have to do is unblock once on the ZIP file itself. IT WONT work if you only unblock the DLL file you are trying to load. Spent about six crazy hours on this. WINDOWS remembers that the source is still unsafe. Hope it helps!

Oh yes, you will still have to allow remote execution on the exe.config file like this. I was moving the a DLL into the modules folder in program files.

<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" /> <supportedRuntime version="v2.0" /> <supportedRuntime version="v3.0" /> </startup> <runtime> <loadFromRemoteSources enabled="true" /> <supportedRuntime version="v4.0" /> <supportedRuntime version="v2.0" /> <supportedRuntime version="v3.0" /> </runtime> </configuration>