diff --git a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj index 03fef417a..565e82614 100644 --- a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj +++ b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj @@ -1,17 +1,12 @@  - - - + net472;net5.0-windows ILSpy.BamlDecompiler.Plugin 8.0 - False - - false - 6488064 + true @@ -29,12 +24,6 @@ ..\ILSpy\bin\$(Configuration)\ - - - - - - @@ -43,93 +32,9 @@ - - False - - - False - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - \ No newline at end of file diff --git a/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj b/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj index acf41f32b..21204bb1b 100644 --- a/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj +++ b/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj @@ -1,17 +1,13 @@  - + net472;net5.0-windows ILSpy.ReadyToRun.Plugin 8.0 - False en-US - false true - false - false @@ -30,48 +26,9 @@ - - False - - - False - - - False - - - - - - - - - - - True - True - Resources.resx - - - - - ReadyToRunOptionPage.xaml - - - - - - - PublicResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - + + + @@ -88,10 +45,4 @@ - - - - - - diff --git a/ILSpy.Tests/ILSpy.Tests.csproj b/ILSpy.Tests/ILSpy.Tests.csproj index 84a804877..77e1264c7 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -62,10 +62,6 @@ - - - - diff --git a/ILSpy/DebugInfo/DiaSymNativeDebugInfoProvider.cs b/ILSpy/DebugInfo/DiaSymNativeDebugInfoProvider.cs deleted file mode 100644 index fe3d58ef7..000000000 --- a/ILSpy/DebugInfo/DiaSymNativeDebugInfoProvider.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) 2018 Siegfried Pammer -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this -// software and associated documentation files (the "Software"), to deal in the Software -// without restriction, including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons -// to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or -// substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE -// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Reflection.Metadata; -using System.Reflection.Metadata.Ecma335; -using System.Text; -using System.Threading.Tasks; -using ICSharpCode.Decompiler.DebugInfo; -using ICSharpCode.Decompiler.Metadata; -using ICSharpCode.Decompiler.Util; -using Microsoft.DiaSymReader; - -namespace ICSharpCode.ILSpy.DebugInfo -{ - class DiaSymNativeDebugInfoProvider : IDebugInfoProvider, ISymReaderMetadataProvider - { - PEFile module; - string pdbFileName; - Stream stream; - MetadataReader metadata; - ISymUnmanagedReader5 reader; - - public DiaSymNativeDebugInfoProvider(PEFile module, string pdbFileName, Stream stream) - { - this.module = module; - this.pdbFileName = pdbFileName; - this.stream = stream; - this.metadata = module.Metadata; - this.reader = SymUnmanagedReaderFactory.CreateReader(stream, this); - } - - public string Description => $"Loaded from PDB file: {pdbFileName}"; - - public IList GetSequencePoints(MethodDefinitionHandle handle) - { - var method = reader.GetMethod(MetadataTokens.GetToken(handle)); - if (method == null || method.GetSequencePointCount(out int count) != 0) - return Empty.Array; - var sequencePoints = new Decompiler.DebugInfo.SequencePoint[count]; - var points = method.GetSequencePoints(); - int i = 0; - var buffer = new char[1024]; - foreach (var point in points) { - string url; - if (point.Document.GetUrl(buffer.Length, out int length, buffer) == 0) { - url = new string(buffer, 0, length - 1); - } else { - url = ""; - } - sequencePoints[i] = new Decompiler.DebugInfo.SequencePoint() { - Offset = point.Offset, - StartLine = point.StartLine, - StartColumn = point.StartColumn, - EndLine = point.EndLine, - EndColumn = point.EndColumn, - DocumentUrl = url - }; - - i++; - } - return sequencePoints; - } - - public IList GetVariables(MethodDefinitionHandle handle) - { - var method = reader.GetMethod(MetadataTokens.GetToken(handle)); - var scopes = new Queue(new[] { method.GetRootScope() }); - var variables = new List(); - - while (scopes.Count > 0) { - var scope = scopes.Dequeue(); - - foreach (var local in scope.GetLocals()) { - variables.Add(new Variable() { Name = local.GetName() }); - } - - foreach (var s in scope.GetChildren()) - scopes.Enqueue(s); - } - - return variables; - } - - public bool TryGetName(MethodDefinitionHandle handle, int index, out string name) - { - var method = reader.GetMethod(MetadataTokens.GetToken(handle)); - var scopes = new Queue(new[] { method.GetRootScope() }); - name = null; - - while (scopes.Count > 0) { - var scope = scopes.Dequeue(); - - foreach (var local in scope.GetLocals()) { - if (local.GetSlot() == index) { - name = local.GetName(); - return true; - } - } - - foreach (var s in scope.GetChildren()) - scopes.Enqueue(s); - } - - return false; - } - - unsafe bool ISymReaderMetadataProvider.TryGetStandaloneSignature(int standaloneSignatureToken, out byte* signature, out int length) - { - var handle = (StandaloneSignatureHandle)MetadataTokens.Handle(standaloneSignatureToken); - if (handle.IsNil) { - signature = null; - length = 0; - return false; - } - - var sig = metadata.GetStandaloneSignature(handle); - var blob = metadata.GetBlobReader(sig.Signature); - - signature = blob.StartPointer; - length = blob.Length; - return true; - } - - bool ISymReaderMetadataProvider.TryGetTypeDefinitionInfo(int typeDefinitionToken, out string namespaceName, out string typeName, out TypeAttributes attributes) - { - var handle = (TypeDefinitionHandle)MetadataTokens.Handle(typeDefinitionToken); - if (handle.IsNil) { - namespaceName = null; - typeName = null; - attributes = 0; - return false; - } - - var typeDefinition = metadata.GetTypeDefinition(handle); - namespaceName = metadata.GetString(typeDefinition.Namespace); - typeName = metadata.GetString(typeDefinition.Name); - attributes = typeDefinition.Attributes; - return true; - } - - bool ISymReaderMetadataProvider.TryGetTypeReferenceInfo(int typeReferenceToken, out string namespaceName, out string typeName) - { - var handle = (TypeReferenceHandle)MetadataTokens.Handle(typeReferenceToken); - if (handle.IsNil) { - namespaceName = null; - typeName = null; - return false; - } - - var typeReference = metadata.GetTypeReference(handle); - namespaceName = metadata.GetString(typeReference.Namespace); - typeName = metadata.GetString(typeReference.Name); - return true; - } - } -} diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index b977567f8..ac93d2fff 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -1,5 +1,5 @@  - + net472;net5.0-windows @@ -8,11 +8,7 @@ False false false - false true - false - false - ICSharpCode.ILSpy True @@ -38,20 +34,11 @@ ..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.ruleset - - - - - - - - - - + @@ -63,776 +50,28 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - App.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ResourceObjectTable.xaml - - - - - - - - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - - - - - - - - - - - - CreateListDialog.xaml - - - - - DebugSteps.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - MSBuild:Compile - - - - True - True - Resources.resx - - - - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - Code - MSBuild:Compile - - - - - - - - - - - - - - - - - - - - - OpenFromGacDialog.xaml - - - ResourceStringTable.xaml - - - - - DisplaySettingsPanel.xaml - - - - MiscSettingsPanel.xaml - - - OptionsDialog.xaml - - - - - - - SearchPane.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - license.txt - - PublicResXFileCodeGenerator - Resources.Designer.cs - - + - - - - - - - - MainWindow.xaml - - - - - DecompilerTextView.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - + + - - - + + @@ -850,13 +89,11 @@ + + - - - - powershell -NoProfile -ExecutionPolicy Bypass -File BuildTools/sort-resx.ps1 diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj index 191b435e1..1eb18eb58 100644 --- a/TestPlugin/TestPlugin.csproj +++ b/TestPlugin/TestPlugin.csproj @@ -1,16 +1,10 @@  - - + net472;net5.0-windows Test.Plugin - False - - False true - false - false @@ -25,37 +19,14 @@ - - - - - - - - - + - - - - - - CustomOptionPage.xaml - - - - - - - - - \ No newline at end of file