From dd79acd2b9fcf7aec3fd8792c4fbc25e221b69e2 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 28 May 2026 20:56:33 +0200 Subject: [PATCH] Restore Properties/AssemblyInfo.cs so the DLL gets the right version Master's manual ILSpy/Properties/AssemblyInfo.cs was dropped during the Avalonia port; the SDK's auto-generated AssemblyInfo took over with default-zero versions. As a result the built ILSpy.dll's assembly metadata read 1.0.0.0 even though DecompilerVersionInfo (the static class generated from the .template by the build pipeline) had the right values. Anything that queried Assembly.GetName().Version or AssemblyInformationalVersionAttribute -- update checks, crash report context, the title-bar version line we still need to wire -- got the SDK default, not the real revision. Port the cross-platform-safe slice of master's AssemblyInfo.cs: Title/Description/Company/Product/Copyright, ComVisible(false), the two version attributes pointing at DecompilerVersionInfo, NeutralResourcesLanguage, InternalsVisibleTo("ILSpy.Tests"), and the CA2243 suppression. Deliberately skipped: [SupportedOSPlatform( "Windows7.0")] and [TargetPlatform("Windows10.0")] (would re-make the assembly Windows-only at metadata level and emit CA1416 noise for cross-platform code paths), [InternalsVisibleTo("ILSpy.AddIn")] (the AddIn project isn't in the avalonia build path), and the WPF-only Properties/WPFAssemblyInfo.cs ThemeInfo (System.Windows-typed). The single-line ILSpy/AssemblyInfo.cs stub that only carried the ILSpy.Tests InternalsVisibleTo gets folded into the new file and removed, matching master's layout. GenerateAssemblyInfo=false in the csproj is the required companion -- without it the SDK emits a second AssemblyVersion attribute and compilation fails with CS0579. Assisted-by: Claude:claude-opus-4-7:Claude Code --- ILSpy/ILSpy.csproj | 6 ++++++ ILSpy/{ => Properties}/AssemblyInfo.cs | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) rename ILSpy/{ => Properties}/AssemblyInfo.cs (51%) diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 62682dba6..7a5469372 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -11,6 +11,12 @@ true ICSharpCode.ILSpy true + + false