Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Adding DLL Type type throws an Assembly Manifest error

$
0
0

I would like to try out these examples for editing Jump lists via powershell.  The WindowsAPIcodePack is not available directly from Microsoft any more so I have downloaded it from Nuget via https://www.nuget.org/packages/WindowsAPICodePack-Core and https://www.nuget.org/packages/WindowsAPICodePack-Core.  I have both the DLL files in the C:\Tools folder just like in the example.  When I attempt to Add the type via this command

Add-Type -Path "c:\tools\Microsoft.WindowsAPICodePack.Shell.dll"

I get error:

Add-Type : Could not load file or assembly 'file:///C:\tools\Microsoft.WindowsAPICodePack.Shell.dll' or one of its dependencies. The 

module was expected to contain an assembly manifest.

At line:1 char:1

+ Add-Type -Path "c:\tools\Microsoft.WindowsAPICodePack.Shell.dll"

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Add-Type], BadImageFormatException

    + FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand

----

I suspect that this is due to a newer version of .Net.  Any ideas on how to remedy this?


Viewing all articles
Browse latest Browse all 6937

Trending Articles