diff --git a/ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs b/ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs index 809bbb3b7..faf167052 100644 --- a/ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs +++ b/ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs @@ -4,6 +4,7 @@ using System.IO; using System.Management.Automation; using System.Text; using ICSharpCode.Decompiler.CSharp; +using ICSharpCode.Decompiler.Metadata; namespace ICSharpCode.Decompiler.PowerShell { @@ -29,7 +30,9 @@ namespace ICSharpCode.Decompiler.PowerShell try { WholeProjectDecompiler decompiler = new WholeProjectDecompiler(); - decompiler.DecompileProject(Decompiler.TypeSystem.MainModule.PEFile, path); + PEFile module = Decompiler.TypeSystem.MainModule.PEFile; + decompiler.AssemblyResolver = new UniversalAssemblyResolver(module.FileName, false, module.Reader.DetectTargetFrameworkId()); + decompiler.DecompileProject(module, path); WriteObject("Decompilation finished"); } catch (Exception e) {