From c3abc687718c9283daacf38a5761c33a9f1bc0e5 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 23 Jun 2026 08:23:21 +0200 Subject: [PATCH] Use SDK default Compile items in ICSharpCode.Decompiler The project listed all 576 source files as explicit with EnableDefaultItems=false, so every new file had to be added by hand. Switch to the SDK's default **/*.cs glob and keep only the exclusions that are actually needed: - Properties/DecompilerVersionInfo.cs is generated before build and absent when the glob is evaluated on a clean checkout, so it is still included explicitly (with a paired Remove to avoid a duplicate once a prior build produced it). - DecompilerVersionInfo.template.cs is a placeholder template, never compiled. Also delete the hand-written DecompilerAstNodeAttribute.cs: the source generator emits this attribute (RegisterPostInitializationOutput), so the on-disk copy was stale dead code -- never compiled, and parameterless where real usages pass [DecompilerAstNode(hasPatternPlaceholder: true)]. Removing it drops what would otherwise be a third exclusion. Default None globbing stays off so the explicit None entries remain the authoritative list. The evaluated Compile set is identical to the previous 576 files; verified by a clean build with the version file both present and absent. Assisted-by: Claude:claude-opus-4-8:Claude Code --- .../Expressions/DecompilerAstNodeAttribute.cs | 32 - .../ICSharpCode.Decompiler.csproj | 599 +----------------- 2 files changed, 14 insertions(+), 617 deletions(-) delete mode 100644 ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DecompilerAstNodeAttribute.cs diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DecompilerAstNodeAttribute.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DecompilerAstNodeAttribute.cs deleted file mode 100644 index b4ad8ca31..000000000 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DecompilerAstNodeAttribute.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2017 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. - - - - - - - -#nullable enable - -namespace ICSharpCode.Decompiler.CSharp.Syntax -{ - class DecompilerAstNodeAttribute : System.Attribute - { - } -} \ No newline at end of file diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 6ced4ee05..5b53efd90 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -31,7 +31,10 @@ False False - false + + false 14 true True @@ -110,591 +113,7 @@ - - - - - - - - - - - - - - True - True - Instructions.tt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - ILOpCodes.tt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TextTemplatingFileGenerator @@ -748,4 +167,14 @@ + + + + + + + +