diff --git a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj index 764156382..2b68ae535 100644 --- a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj +++ b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj @@ -1,17 +1,12 @@  - - - + net472 ILSpy.BamlDecompiler.Plugin 8.0 - False - - false - 6488064 + true @@ -29,107 +24,21 @@ ..\ILSpy\bin\$(Configuration)\ - - - - - - - - + - - False - - - False - - - False - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - \ No newline at end of file diff --git a/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj b/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj index 4b53267e0..53d2c0940 100644 --- a/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj +++ b/ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj @@ -1,17 +1,13 @@  - + net472 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 7ce20e599..7ce61623a 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -62,10 +62,6 @@ - - - - diff --git a/ILSpy.WithPackage.sln b/ILSpy.WithPackage.sln index b8813b52b..dc86a6a01 100644 --- a/ILSpy.WithPackage.sln +++ b/ILSpy.WithPackage.sln @@ -11,6 +11,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E7 EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy", "ILSpy\ILSpy.csproj", "{1E85EFF9-E370-4683-83E4-8A3D063FF791}" + ProjectSection(ProjectDependencies) = postProject + {984CC812-9470-4A13-AFF9-CC44068D666C} = {984CC812-9470-4A13-AFF9-CC44068D666C} + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.TreeView", "SharpTreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" EndProject @@ -24,11 +27,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.BamlDecompiler", "ILS EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.BamlDecompiler.Tests", "ILSpy.BamlDecompiler.Tests\ILSpy.BamlDecompiler.Tests.csproj", "{1169E6D1-1899-43D4-A500-07CE4235B388}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.AddIn", "ILSpy.AddIn\ILSpy.AddIn.csproj", "{9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}" - ProjectSection(ProjectDependencies) = postProject - {A6BAD2BA-76BA-461C-8B6D-418607591247} = {A6BAD2BA-76BA-461C-8B6D-418607591247} - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.PdbProvider.Cecil", "ICSharpCode.Decompiler.PdbProvider.Cecil\ICSharpCode.Decompiler.PdbProvider.Cecil.csproj", "{B85A155A-9DD6-43BC-A624-2D8EC773D71F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.Tests", "ILSpy.Tests\ILSpy.Tests.csproj", "{B51C6636-B8D1-4200-9869-08F2689DE6C2}" @@ -37,12 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.ReadyToRun", "ILSpy.R EndProject Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "ILSpy.Package", "ILSpy.Package\ILSpy.Package.wapproj", "{BAB51A23-9C15-42CC-8465-EB732BF9A932}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{58AA7BDB-174C-4566-BD8A-EC461F1D6848}" - ProjectSection(SolutionItems) = preProject - azure-pipelines.yml = azure-pipelines.yml - BuildTools\update-assemblyinfo.ps1 = BuildTools\update-assemblyinfo.ps1 - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/ILSpy.sln b/ILSpy.sln index 1445db3f9..3803fa607 100644 --- a/ILSpy.sln +++ b/ILSpy.sln @@ -11,6 +11,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E7 EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy", "ILSpy\ILSpy.csproj", "{1E85EFF9-E370-4683-83E4-8A3D063FF791}" + ProjectSection(ProjectDependencies) = postProject + {984CC812-9470-4A13-AFF9-CC44068D666C} = {984CC812-9470-4A13-AFF9-CC44068D666C} + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.TreeView", "SharpTreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" EndProject @@ -26,6 +29,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.BamlDecompiler.Tests" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.AddIn", "ILSpy.AddIn\ILSpy.AddIn.csproj", "{9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}" ProjectSection(ProjectDependencies) = postProject + {0313F581-C63B-43BB-AA9B-07615DABD8A3} = {0313F581-C63B-43BB-AA9B-07615DABD8A3} {A6BAD2BA-76BA-461C-8B6D-418607591247} = {A6BAD2BA-76BA-461C-8B6D-418607591247} EndProjectSection EndProject diff --git a/ILSpy/AboutPage.cs b/ILSpy/AboutPage.cs index 8e3b2fc77..2cdaf974d 100644 --- a/ILSpy/AboutPage.cs +++ b/ILSpy/AboutPage.cs @@ -35,8 +35,6 @@ using ICSharpCode.Decompiler; using ICSharpCode.ILSpy.Properties; using ICSharpCode.ILSpy.TextView; -using OSVersionHelper; - namespace ICSharpCode.ILSpy { [ExportMainMenuCommand(Menu = nameof(Resources._Help), Header = nameof(Resources._About), MenuOrder = 99999)] @@ -62,9 +60,10 @@ namespace ICSharpCode.ILSpy EnableHyperlinks = true }; output.WriteLine(Resources.ILSpyVersion + RevisionClass.FullVersion); - if (WindowsVersionHelper.HasPackageIdentity) + + if (StorePackageHelper.HasPackageIdentity) { - output.WriteLine($"Package Name: {WindowsVersionHelper.GetPackageFamilyName()}"); + output.WriteLine($"Package Name: {StorePackageHelper.GetPackageFamilyName()}"); } else {// if we're running in an MSIX, updates work differently @@ -300,7 +299,7 @@ namespace ICSharpCode.ILSpy UpdateSettings s = new UpdateSettings(spySettings); // If we're in an MSIX package, updates work differently - if (s.AutomaticUpdateCheckEnabled && !WindowsVersionHelper.HasPackageIdentity) + if (s.AutomaticUpdateCheckEnabled && !StorePackageHelper.HasPackageIdentity) { // perform update check if we never did one before; // or if the last check wasn't in the past 7 days diff --git a/ILSpy/Analyzers/AnalyzerScope.cs b/ILSpy/Analyzers/AnalyzerScope.cs index 26480a913..f0f927dc0 100644 --- a/ILSpy/Analyzers/AnalyzerScope.cs +++ b/ILSpy/Analyzers/AnalyzerScope.cs @@ -23,11 +23,12 @@ using System.Threading; using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Metadata; -using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.Util; namespace ICSharpCode.ILSpy.Analyzers { + using ICSharpCode.Decompiler.TypeSystem; + public class AnalyzerScope { readonly ITypeDefinition typeScope; diff --git a/ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs b/ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs index f69bb8743..2b9109638 100644 --- a/ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/TypeExposedByAnalyzer.cs @@ -24,10 +24,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ICSharpCode.Decompiler.TypeSystem; namespace ICSharpCode.ILSpy.Analyzers.Builtin { + using ICSharpCode.Decompiler.TypeSystem; + /// /// Finds all entities that expose a type. /// diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs index 737495a7c..923ba5602 100644 --- a/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs +++ b/ILSpy/Analyzers/TreeNodes/AnalyzedEventTreeNode.cs @@ -19,11 +19,12 @@ using System; using System.Linq; -using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.ILSpy.TreeNodes; namespace ICSharpCode.ILSpy.Analyzers.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; + internal sealed class AnalyzedEventTreeNode : AnalyzerEntityTreeNode { readonly IEvent analyzedEvent; diff --git a/ILSpy/App.xaml.cs b/ILSpy/App.xaml.cs index 0e7597907..6541f453f 100644 --- a/ILSpy/App.xaml.cs +++ b/ILSpy/App.xaml.cs @@ -98,6 +98,7 @@ namespace ICSharpCode.ILSpy var discovery = new AttributedPartDiscoveryV1(Resolver.DefaultInstance); var catalog = ComposableCatalog.Create(Resolver.DefaultInstance); var pluginDir = Path.GetDirectoryName(typeof(App).Module.FullyQualifiedName); +#if NET472 if (pluginDir != null) { foreach (var plugin in Directory.GetFiles(pluginDir, "*.Plugin.dll")) @@ -115,6 +116,7 @@ namespace ICSharpCode.ILSpy } } } +#endif // Add the built-in parts var createdParts = await discovery.CreatePartsAsync(Assembly.GetExecutingAssembly()); catalog = catalog.AddParts(createdParts); diff --git a/ILSpy/Commands/CheckForUpdatesCommand.cs b/ILSpy/Commands/CheckForUpdatesCommand.cs index 7cdc2ee86..b7fbb7c9b 100644 --- a/ILSpy/Commands/CheckForUpdatesCommand.cs +++ b/ILSpy/Commands/CheckForUpdatesCommand.cs @@ -19,8 +19,6 @@ using ICSharpCode.ILSpy.Properties; -using OSVersionHelper; - namespace ICSharpCode.ILSpy { [ExportMainMenuCommand(Menu = nameof(Resources._Help), Header = nameof(Resources._CheckUpdates), MenuOrder = 5000)] @@ -28,7 +26,7 @@ namespace ICSharpCode.ILSpy { public override bool CanExecute(object parameter) { - if (WindowsVersionHelper.HasPackageIdentity) + if (StorePackageHelper.HasPackageIdentity) { return false; } diff --git a/ILSpy/Commands/SearchMsdnContextMenuEntry.cs b/ILSpy/Commands/SearchMsdnContextMenuEntry.cs index 8094f4dae..08c7f5a42 100644 --- a/ILSpy/Commands/SearchMsdnContextMenuEntry.cs +++ b/ILSpy/Commands/SearchMsdnContextMenuEntry.cs @@ -19,11 +19,12 @@ using System.Linq; using System.Threading; -using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.ILSpy.Properties; using ICSharpCode.ILSpy.TreeNodes; namespace ICSharpCode.ILSpy { + using ICSharpCode.Decompiler.TypeSystem; + [ExportContextMenuEntry(Header = nameof(Resources.SearchMSDN), Icon = "images/SearchMsdn", Order = 9999)] internal sealed class SearchMsdnContextMenuEntry : IContextMenuEntry { 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 d1ec22e33..3254d8217 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -1,5 +1,5 @@  - + net472 @@ -8,11 +8,7 @@ False false false - false true - false - false - ICSharpCode.ILSpy True @@ -38,20 +34,11 @@ ..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.ruleset - - - - - - - - - - + @@ -59,815 +46,42 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - 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 - - - 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 - - - MSBuild:Compile - + + - - - - - + + @@ -888,11 +102,6 @@ - - - - - powershell -NoProfile -ExecutionPolicy Bypass -File BuildTools/sort-resx.ps1 diff --git a/ILSpy/ILSpyTraceListener.cs b/ILSpy/ILSpyTraceListener.cs index ec9c5be07..9f0e4ff6a 100644 --- a/ILSpy/ILSpyTraceListener.cs +++ b/ILSpy/ILSpyTraceListener.cs @@ -31,8 +31,10 @@ namespace ICSharpCode.ILSpy [Conditional("DEBUG")] public static void Install() { +#if NET472 Debug.Listeners.Clear(); Debug.Listeners.Add(new ILSpyTraceListener()); +#endif } public ILSpyTraceListener() diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index c45596064..61abecbdb 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -52,8 +52,6 @@ using ICSharpCode.TreeView; using Microsoft.Win32; -using OSVersionHelper; - namespace ICSharpCode.ILSpy { class MainWindowDataContext @@ -687,7 +685,7 @@ namespace ICSharpCode.ILSpy public async Task ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false) { // Don't check for updates if we're in an MSIX since they work differently - if (WindowsVersionHelper.HasPackageIdentity) + if (StorePackageHelper.HasPackageIdentity) { return; } diff --git a/ILSpy/Search/AbstractEntitySearchStrategy.cs b/ILSpy/Search/AbstractEntitySearchStrategy.cs index 556f3aaee..2bf9cc47e 100644 --- a/ILSpy/Search/AbstractEntitySearchStrategy.cs +++ b/ILSpy/Search/AbstractEntitySearchStrategy.cs @@ -5,11 +5,12 @@ using System.Threading; using System.Windows.Media; using ICSharpCode.Decompiler.Metadata; -using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.ILSpy.TreeNodes; namespace ICSharpCode.ILSpy.Search { + using ICSharpCode.Decompiler.TypeSystem; + abstract class AbstractEntitySearchStrategy : AbstractSearchStrategy { protected readonly Language language; diff --git a/ILSpy/StorePackageHelper.cs b/ILSpy/StorePackageHelper.cs new file mode 100644 index 000000000..f7def8fac --- /dev/null +++ b/ILSpy/StorePackageHelper.cs @@ -0,0 +1,24 @@ +using OSVersionHelper; + +namespace ICSharpCode.ILSpy +{ + // The Store package is ever only built for net472 + public static class StorePackageHelper + { + public static bool HasPackageIdentity { + get { +#if NET472 + return WindowsVersionHelper.HasPackageIdentity; +#endif + return false; + } + } + public static string GetPackageFamilyName() + { +#if NET472 + return WindowsVersionHelper.GetPackageFamilyName(); +#endif + return ""; + } + } +} diff --git a/ILSpy/TreeNodes/DerivedTypesEntryNode.cs b/ILSpy/TreeNodes/DerivedTypesEntryNode.cs index 6c16c50c6..48199ecd0 100644 --- a/ILSpy/TreeNodes/DerivedTypesEntryNode.cs +++ b/ILSpy/TreeNodes/DerivedTypesEntryNode.cs @@ -21,10 +21,11 @@ using System.Linq; using System.Threading; using ICSharpCode.Decompiler; -using ICSharpCode.Decompiler.TypeSystem; namespace ICSharpCode.ILSpy.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; + class DerivedTypesEntryNode : ILSpyTreeNode, IMemberTreeNode { readonly AssemblyList list; diff --git a/ILSpy/TreeNodes/EventTreeNode.cs b/ILSpy/TreeNodes/EventTreeNode.cs index 030b36b76..38ad76f5b 100644 --- a/ILSpy/TreeNodes/EventTreeNode.cs +++ b/ILSpy/TreeNodes/EventTreeNode.cs @@ -20,10 +20,11 @@ using System; using System.Windows.Media; using ICSharpCode.Decompiler; -using ICSharpCode.Decompiler.TypeSystem; namespace ICSharpCode.ILSpy.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; + /// /// Represents an event in the TreeView. /// diff --git a/ILSpy/TreeNodes/FieldTreeNode.cs b/ILSpy/TreeNodes/FieldTreeNode.cs index 45283602a..a997c2547 100644 --- a/ILSpy/TreeNodes/FieldTreeNode.cs +++ b/ILSpy/TreeNodes/FieldTreeNode.cs @@ -20,10 +20,11 @@ using System; using System.Windows.Media; using ICSharpCode.Decompiler; -using ICSharpCode.Decompiler.TypeSystem; namespace ICSharpCode.ILSpy.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; + /// /// Represents a field in the TreeView. /// diff --git a/ILSpy/TreeNodes/MethodTreeNode.cs b/ILSpy/TreeNodes/MethodTreeNode.cs index a6420404b..474639b94 100644 --- a/ILSpy/TreeNodes/MethodTreeNode.cs +++ b/ILSpy/TreeNodes/MethodTreeNode.cs @@ -20,10 +20,11 @@ using System; using System.Windows.Media; using ICSharpCode.Decompiler; -using ICSharpCode.Decompiler.TypeSystem; namespace ICSharpCode.ILSpy.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; + /// /// Tree Node representing a field, method, property, or event. /// diff --git a/ILSpy/TreeNodes/PropertyTreeNode.cs b/ILSpy/TreeNodes/PropertyTreeNode.cs index 444018149..5dec47290 100644 --- a/ILSpy/TreeNodes/PropertyTreeNode.cs +++ b/ILSpy/TreeNodes/PropertyTreeNode.cs @@ -23,12 +23,13 @@ using System.Windows.Media; using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Metadata; -using ICSharpCode.Decompiler.TypeSystem; using SRM = System.Reflection.Metadata; namespace ICSharpCode.ILSpy.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; + /// /// Represents a property in the TreeView. /// diff --git a/ILSpy/TreeNodes/TypeTreeNode.cs b/ILSpy/TreeNodes/TypeTreeNode.cs index 5e56ca4da..92739230e 100644 --- a/ILSpy/TreeNodes/TypeTreeNode.cs +++ b/ILSpy/TreeNodes/TypeTreeNode.cs @@ -22,12 +22,12 @@ using System.Reflection; using System.Windows.Media; using ICSharpCode.Decompiler; -using ICSharpCode.Decompiler.TypeSystem; using SRM = System.Reflection.Metadata; namespace ICSharpCode.ILSpy.TreeNodes { + using ICSharpCode.Decompiler.TypeSystem; public sealed class TypeTreeNode : ILSpyTreeNode, IMemberTreeNode { public TypeTreeNode(ITypeDefinition typeDefinition, AssemblyTreeNode parentAssemblyNode) diff --git a/SharpTreeView/ICSharpCode.TreeView.csproj b/SharpTreeView/ICSharpCode.TreeView.csproj index bcd3188a1..395323b1c 100644 --- a/SharpTreeView/ICSharpCode.TreeView.csproj +++ b/SharpTreeView/ICSharpCode.TreeView.csproj @@ -1,16 +1,10 @@  - + net472 - - False - - false true - false - false - + False True ..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk @@ -25,45 +19,6 @@ true - - - - - - - - - - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj index 6b896bc5a..5511258c2 100644 --- a/TestPlugin/TestPlugin.csproj +++ b/TestPlugin/TestPlugin.csproj @@ -1,16 +1,10 @@  - - + net472 Test.Plugin - False - - False true - false - false @@ -25,37 +19,14 @@ - - - - - - - - - + - - - - - - CustomOptionPage.xaml - - - - - - - - - \ No newline at end of file diff --git a/global.json b/global.json index 9f0fa0bd9..ec4aae143 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.54" + "MSBuild.Sdk.Extras": "3.0.23" }, "sdk": { "version": "3.1.100",