Browse Source

Fix #3300: System.FormatException: The input string 'PDB' was not in a correct format.

pull/3307/head
Siegfried Pammer 7 months ago
parent
commit
df859a0520
  1. 2
      ICSharpCode.ILSpyX/LoadedAssembly.cs
  2. 10
      ILSpy/Commands/SaveCodeContextMenuEntry.cs

2
ICSharpCode.ILSpyX/LoadedAssembly.cs

@ -299,7 +299,7 @@ namespace ICSharpCode.ILSpyX @@ -299,7 +299,7 @@ namespace ICSharpCode.ILSpyX
/// </summary>
public bool IsLoadedAsValidAssembly {
get {
return loadingTask.Status == TaskStatus.RanToCompletion && loadingTask.Result.MetadataFile != null;
return loadingTask.Status == TaskStatus.RanToCompletion && loadingTask.Result.MetadataFile is { IsMetadataOnly: false };
}
}

10
ILSpy/Commands/SaveCodeContextMenuEntry.cs

@ -18,21 +18,17 @@ @@ -18,21 +18,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Windows;
using ICSharpCode.Decompiler.IL;
using ICSharpCode.ILSpy.Options;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TreeNodes;
using ICSharpCode.ILSpy.ViewModels;
using Microsoft.Win32;
using ICSharpCode.ILSpyX.TreeView;
using System.ComponentModel.Composition;
using ICSharpCode.ILSpy.Docking;
using Microsoft.Win32;
namespace ICSharpCode.ILSpy.TextView
@ -76,7 +72,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -76,7 +72,7 @@ namespace ICSharpCode.ILSpy.TextView
if (singleSelection.Save(tabPage))
return;
}
else if (selectedNodes.Count > 1 && selectedNodes.All(n => n is AssemblyTreeNode))
else if (selectedNodes.Count > 1 && selectedNodes.All(n => n is AssemblyTreeNode { LoadedAssembly.IsLoadedAsValidAssembly: true }))
{
var selectedPath = SelectSolutionFile();

Loading…
Cancel
Save