Browse Source

Fix missing AssemblyResolver in ILSpyWholeProjectDecompiler.

pull/1030/head
Siegfried Pammer 7 years ago
parent
commit
41e43920dc
  1. 4
      ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs
  2. 1
      ILSpy/Languages/CSharpLanguage.cs

4
ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp
/// </remarks>
protected string targetDirectory;
public void DecompileProject(Metadata.PEFile moduleDefinition, string targetDirectory, CancellationToken cancellationToken = default(CancellationToken))
public void DecompileProject(PEFile moduleDefinition, string targetDirectory, CancellationToken cancellationToken = default(CancellationToken))
{
string projectFileName = Path.Combine(targetDirectory, CleanUpFileName(moduleDefinition.Name) + ".csproj");
using (var writer = new StreamWriter(projectFileName)) {
@ -88,7 +88,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -88,7 +88,7 @@ namespace ICSharpCode.Decompiler.CSharp
}
}
public void DecompileProject(Metadata.PEFile moduleDefinition, string targetDirectory, TextWriter projectFileWriter, CancellationToken cancellationToken = default(CancellationToken))
public void DecompileProject(PEFile moduleDefinition, string targetDirectory, TextWriter projectFileWriter, CancellationToken cancellationToken = default(CancellationToken))
{
if (string.IsNullOrEmpty(targetDirectory)) {
throw new InvalidOperationException("Must set TargetDirectory");

1
ILSpy/Languages/CSharpLanguage.cs

@ -380,6 +380,7 @@ namespace ICSharpCode.ILSpy @@ -380,6 +380,7 @@ namespace ICSharpCode.ILSpy
this.assembly = assembly;
this.options = options;
base.Settings = options.DecompilerSettings;
base.AssemblyResolver = assembly.GetAssemblyResolver();
}
protected override IEnumerable<Tuple<string, string>> WriteResourceToFile(string fileName, string resourceName, Stream entryStream)

Loading…
Cancel
Save