From 40a667fefb6b1c77ff9b837fa367c19aff6a4295 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 9 Jun 2026 22:43:23 +0200 Subject: [PATCH] Treat warnings as errors repo-wide A clean build currently has zero warnings; enforce that so new ones can't accumulate unnoticed. Set TreatWarningsAsErrors in the root Directory.Build.props rather than per project. ICSharpCode.ILSpyCmd keeps its existing TreatWarningsAsErrors=false (project-level wins over the imported default), and the three legacy net472 projects (the VS add-ins and the installer builder) opt out explicitly since they only build on Windows and aren't covered by the cross-platform CI that gates this. Assisted-by: Claude:claude-opus-4-8:Claude Code --- Directory.Build.props | 7 +++++++ ILSpy.AddIn.VS2022/ILSpy.AddIn.VS2022.csproj | 2 ++ ILSpy.AddIn/ILSpy.AddIn.csproj | 2 ++ ILSpy.Installer/ILSpy.Installer.csproj | 2 ++ 4 files changed, 13 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 8d29f4085..a042e9147 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,6 +3,13 @@ $(NoWarn);NU1510 + + + true + + true diff --git a/ILSpy.AddIn.VS2022/ILSpy.AddIn.VS2022.csproj b/ILSpy.AddIn.VS2022/ILSpy.AddIn.VS2022.csproj index dcea51027..9d89f674e 100644 --- a/ILSpy.AddIn.VS2022/ILSpy.AddIn.VS2022.csproj +++ b/ILSpy.AddIn.VS2022/ILSpy.AddIn.VS2022.csproj @@ -11,6 +11,8 @@ 1.7.1.0 1.7.1.0 9.0 + + false False true diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index 3681515de..db5f3114e 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -11,6 +11,8 @@ 1.7.1.0 1.7.1.0 9.0 + + false False true diff --git a/ILSpy.Installer/ILSpy.Installer.csproj b/ILSpy.Installer/ILSpy.Installer.csproj index 8603eb6f1..51dae3d0f 100644 --- a/ILSpy.Installer/ILSpy.Installer.csproj +++ b/ILSpy.Installer/ILSpy.Installer.csproj @@ -4,6 +4,8 @@ Exe net472 ILSpy.Installer.Builder + + false