Browse Source

Fix #1257 for GetDecompiledProjectCmdlet

pull/1274/merge
Siegfried Pammer 7 years ago
parent
commit
7a58b8e6d5
  1. 5
      ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs

5
ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs

@ -4,6 +4,7 @@ using System.IO; @@ -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 @@ -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) {

Loading…
Cancel
Save