From e794f232343595df03958d2158eea34558bb1e68 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 8 Oct 2024 15:38:05 -0300 Subject: [PATCH] Properly emit AssemblyInfo even if GenerateAssemblyInfo=false We were missing this since the SDK defaults the specific attributes to `true` only if the overall flag `GenerateAssemblyInfo` is `true`. We change that in our targets, but without forcing `GenerateAssemblyInfo=true`. This allows to turn off codegen, but still get the attributes as items. Fixes #407 --- .../ThisAssembly.AssemblyInfo.targets | 28 +++++++++++++++++++ .../ThisAssembly.Tests.csproj | 2 ++ 2 files changed, 30 insertions(+) diff --git a/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets b/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets index 162ae820..ae226ca9 100644 --- a/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets +++ b/src/ThisAssembly.AssemblyInfo/ThisAssembly.AssemblyInfo.targets @@ -10,6 +10,34 @@ + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + diff --git a/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj b/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj index 6de605a3..e0eb23f8 100644 --- a/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj +++ b/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj @@ -5,6 +5,8 @@ net8.0 ThisAssemblyTests public + + false A Description with a newline and