1

Resolved

Installation failed [RESOLVED]

description

Following the installation instructions, copied the TaxonomyToolkit folder to my C:\TaxonomyToolkit location. On executing the instructions, I received the following results.

PS C:\WINDOWS\system32> $PSVersionTable

Name Value

PSVersion 5.0.10240.16384
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 10.0.10240.16384
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3


PS C:\WINDOWS\system32> Import-Module C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.psd1
Import-Module : Could not load file or assembly 'file:///C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.dll' or one of
its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
  • Import-Module C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.psd1
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException
    • FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

comments

pgonzal wrote Sep 22, 2015 at 5:21 AM

I haven't seen this error before. Which operating system are you using? Also, are you using the 64-bit or 32-bit version of PowerShell?

Please try the advice on this page and let me know if it helps:
http://stackoverflow.com/questions/18801440/powershell-load-dll-got-error-add-type-could-not-load-file-or-assembly-webdr

pgonzal wrote Sep 27, 2015 at 7:46 AM

Thanks for contacting me. I was able to reproduce your issue by installing Windows 10 Home 64-bit edition. After a bunch of debugging, I think the problem is that TaxonomyToolkit was built using .NET Framework 4.0, whereas the SharePoint libraries were built with .NET Framework 4.5. This should probably have never worked at all, but .NET 4.5 allows it due to a weird interchangeability with 4.0 (discussed in this article if you're curious). Whereas Windows 10 ships with .NET 4.6 whose backwards compatibility apparently requires a true 4.5 binary.

Anyway, it seems that no version of Windows actually shipped with .NET Framework 4.0. So I think the right solution is for me to recompile TaxonomyToolkit as a .NET 4.5 binary. That should ensure compatibility with pretty much any recent Windows OS. Thanks for taking the time to report this!

pgonzal wrote Sep 27, 2015 at 8:32 AM

I just posted a Taxonomy Toolkit 2.1.1 release. Please give it a try and let me know if it fixes your issue.

RoyRoebuck wrote Sep 27, 2015 at 4:35 PM

Just ran 2.1.1 from both Powershell and Powershell ISE. Results follow.

PS C:\Users\Roy> $PSVersionTable

Name Value

PSVersion 5.0.10240.16384
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 10.0.10240.16384
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3



PS C:\Users\Roy> Import-Module C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.psd1
Import-Module : Could not load file or assembly 'file:///C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.dll' or one of its dependencies. Operation is not
supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
  • Import-Module C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.psd1
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException

    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

pgonzal wrote Sep 27, 2015 at 6:55 PM

I see. This is due to the StackOverflow thing where Windows 10 doesn't trust the DLL because it came from a zip file. You can right-click on the DLL and check the "Unblock" checkbox, or just run this PowerShell command:

Unblock-File C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.dll

I found that this doesn't work right away -- you need to close and restart the PowerShell window afterwards. Please confirm that this solves your problem, and I'll update the installation instructions.

A better fix would be for me to create an MSI installer for TaxonomyToolkit. I didn't do that originally because I thought people might prefer a more "portable" version of the tool, but let me know if you think it's worth it.

RoyRoebuck wrote Sep 27, 2015 at 7:29 PM

The unblock instruction worked. Results

PS C:\Users\Roy> Unblock-File C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.dll


PS C:\Users\Roy> Import-Module C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.psd1

The prompt came back without error.

pgonzal wrote Sep 27, 2015 at 7:50 PM

Happy to hear that! Let me know if you have any other questions or feedback about the tool.

pgonzal wrote Sep 27, 2015 at 7:51 PM

** Closed by pgonzal 09/27/2015 12:51PM