From 4a1cde8db21895bb0ff29c08c58a58a695cbc2cd Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 25 Sep 2026 20:21:02 -0700 Subject: [PATCH 1/3] Scope VerifyReferenceAotCompatibility to an AOT Publish in dotnet-codestyle State IsAotCompatible unconditionally and VerifyReferenceAotCompatibility only under the PublishAot condition, with the reason: reference verification reports IL3058 for every dependency not built AOT-compatible, which TreatWarningsAsErrors turns into a failed build on ordinary fleet dependencies. Regenerate the skill distributions. Closes on promotion: #1857 Co-authored-by: Claude Opus 5.5 (1M context) --- .agents/skills/dotnet-codestyle/SKILL.md | 2 +- .../skills/dotnet-codestyle/references/project-config.md | 8 ++++++-- .../fleet-skills/.source-digests/dotnet-codestyle | 2 +- .../fleet-skills/skills/dotnet-codestyle/SKILL.md | 2 +- .../skills/dotnet-codestyle/references/project-config.md | 8 ++++++-- .github/skills/dotnet-codestyle/SKILL.md | 2 +- .../skills/dotnet-codestyle/references/project-config.md | 8 ++++++-- 7 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.agents/skills/dotnet-codestyle/SKILL.md b/.agents/skills/dotnet-codestyle/SKILL.md index 7eb208971..b13de18d1 100644 --- a/.agents/skills/dotnet-codestyle/SKILL.md +++ b/.agents/skills/dotnet-codestyle/SKILL.md @@ -214,7 +214,7 @@ parameterized tests. A test project on `xunit.v3` 4.0.0 or later is MTP-based, a ## Project configuration -.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, `VerifyReferenceAotCompatibility=true`), +.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, with `VerifyReferenceAotCompatibility=true` only under the `PublishAot` condition), SourceLink, embedded untracked sources, `InternalsVisibleTo` for test/benchmark access. See `references/project-config.md` for the full property list. diff --git a/.agents/skills/dotnet-codestyle/references/project-config.md b/.agents/skills/dotnet-codestyle/references/project-config.md index 42b8fd1ca..990cf855b 100644 --- a/.agents/skills/dotnet-codestyle/references/project-config.md +++ b/.agents/skills/dotnet-codestyle/references/project-config.md @@ -1,8 +1,12 @@ # .NET Project Configuration 1. **Target framework**: .NET 10.0 (`net10.0`). -2. **AOT compatibility**: `true`, - `true`. +2. **AOT compatibility**: `true` unconditionally, and + `true` only in a + ``. Reference verification reports + `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that + into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog + sinks, so it runs only where an AOT publish needs it. 3. **Assembly information**: use semantic versioning, include SourceLink (`true`), embed untracked sources (`true`). diff --git a/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle b/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle index a221fb7b8..058053244 100644 --- a/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle +++ b/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle @@ -1 +1 @@ -770653a908016ec0 +ac76f8510714b464 diff --git a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/SKILL.md b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/SKILL.md index 7eb208971..b13de18d1 100644 --- a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/SKILL.md +++ b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/SKILL.md @@ -214,7 +214,7 @@ parameterized tests. A test project on `xunit.v3` 4.0.0 or later is MTP-based, a ## Project configuration -.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, `VerifyReferenceAotCompatibility=true`), +.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, with `VerifyReferenceAotCompatibility=true` only under the `PublishAot` condition), SourceLink, embedded untracked sources, `InternalsVisibleTo` for test/benchmark access. See `references/project-config.md` for the full property list. diff --git a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md index 42b8fd1ca..990cf855b 100644 --- a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md +++ b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md @@ -1,8 +1,12 @@ # .NET Project Configuration 1. **Target framework**: .NET 10.0 (`net10.0`). -2. **AOT compatibility**: `true`, - `true`. +2. **AOT compatibility**: `true` unconditionally, and + `true` only in a + ``. Reference verification reports + `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that + into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog + sinks, so it runs only where an AOT publish needs it. 3. **Assembly information**: use semantic versioning, include SourceLink (`true`), embed untracked sources (`true`). diff --git a/.github/skills/dotnet-codestyle/SKILL.md b/.github/skills/dotnet-codestyle/SKILL.md index 7eb208971..b13de18d1 100644 --- a/.github/skills/dotnet-codestyle/SKILL.md +++ b/.github/skills/dotnet-codestyle/SKILL.md @@ -214,7 +214,7 @@ parameterized tests. A test project on `xunit.v3` 4.0.0 or later is MTP-based, a ## Project configuration -.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, `VerifyReferenceAotCompatibility=true`), +.NET 10.0 target, AOT-compatible (`IsAotCompatible=true`, with `VerifyReferenceAotCompatibility=true` only under the `PublishAot` condition), SourceLink, embedded untracked sources, `InternalsVisibleTo` for test/benchmark access. See `references/project-config.md` for the full property list. diff --git a/.github/skills/dotnet-codestyle/references/project-config.md b/.github/skills/dotnet-codestyle/references/project-config.md index 42b8fd1ca..990cf855b 100644 --- a/.github/skills/dotnet-codestyle/references/project-config.md +++ b/.github/skills/dotnet-codestyle/references/project-config.md @@ -1,8 +1,12 @@ # .NET Project Configuration 1. **Target framework**: .NET 10.0 (`net10.0`). -2. **AOT compatibility**: `true`, - `true`. +2. **AOT compatibility**: `true` unconditionally, and + `true` only in a + ``. Reference verification reports + `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that + into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog + sinks, so it runs only where an AOT publish needs it. 3. **Assembly information**: use semantic versioning, include SourceLink (`true`), embed untracked sources (`true`). From da719dd841509d2f294809042ebe6107acb0afad Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 25 Sep 2026 20:22:31 -0700 Subject: [PATCH 2/3] Place the PublishAot-Conditioned Group Where PublishAot Is Already Set Directory.Build.props is imported before the project body, so a condition on PublishAot there sees it empty and never enables reference verification. Name the .csproj or Directory.Build.targets instead. Co-authored-by: Claude Opus 5.5 (1M context) --- .agents/skills/dotnet-codestyle/references/project-config.md | 4 +++- .claude-plugin/fleet-skills/.source-digests/dotnet-codestyle | 2 +- .../skills/dotnet-codestyle/references/project-config.md | 4 +++- .github/skills/dotnet-codestyle/references/project-config.md | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.agents/skills/dotnet-codestyle/references/project-config.md b/.agents/skills/dotnet-codestyle/references/project-config.md index 990cf855b..98a7141af 100644 --- a/.agents/skills/dotnet-codestyle/references/project-config.md +++ b/.agents/skills/dotnet-codestyle/references/project-config.md @@ -3,7 +3,9 @@ 1. **Target framework**: .NET 10.0 (`net10.0`). 2. **AOT compatibility**: `true` unconditionally, and `true` only in a - ``. Reference verification reports + ``, placed in the `.csproj` after it sets + `PublishAot` or in `Directory.Build.targets`, never in `Directory.Build.props`, which is imported + before the project body and so sees `PublishAot` empty. Reference verification reports `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog sinks, so it runs only where an AOT publish needs it. diff --git a/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle b/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle index 058053244..0c4af7e65 100644 --- a/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle +++ b/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle @@ -1 +1 @@ -ac76f8510714b464 +5afa0d478af9ead5 diff --git a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md index 990cf855b..98a7141af 100644 --- a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md +++ b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md @@ -3,7 +3,9 @@ 1. **Target framework**: .NET 10.0 (`net10.0`). 2. **AOT compatibility**: `true` unconditionally, and `true` only in a - ``. Reference verification reports + ``, placed in the `.csproj` after it sets + `PublishAot` or in `Directory.Build.targets`, never in `Directory.Build.props`, which is imported + before the project body and so sees `PublishAot` empty. Reference verification reports `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog sinks, so it runs only where an AOT publish needs it. diff --git a/.github/skills/dotnet-codestyle/references/project-config.md b/.github/skills/dotnet-codestyle/references/project-config.md index 990cf855b..98a7141af 100644 --- a/.github/skills/dotnet-codestyle/references/project-config.md +++ b/.github/skills/dotnet-codestyle/references/project-config.md @@ -3,7 +3,9 @@ 1. **Target framework**: .NET 10.0 (`net10.0`). 2. **AOT compatibility**: `true` unconditionally, and `true` only in a - ``. Reference verification reports + ``, placed in the `.csproj` after it sets + `PublishAot` or in `Directory.Build.targets`, never in `Directory.Build.props`, which is imported + before the project body and so sees `PublishAot` empty. Reference verification reports `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog sinks, so it runs only where an AOT publish needs it. From c5d3b813a61980ab42ffb2a76b8fe6c24a9964a3 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 25 Sep 2026 20:26:41 -0700 Subject: [PATCH 3/3] State Only That Directory.Build.props Misses a .csproj PublishAot A global -p:PublishAot=true is visible in Directory.Build.props, so the rationale now names only the case the placement rule guards: a PublishAot the .csproj sets. Co-authored-by: Claude Opus 5.5 (1M context) --- .../skills/dotnet-codestyle/references/project-config.md | 8 ++++---- .../fleet-skills/.source-digests/dotnet-codestyle | 2 +- .../skills/dotnet-codestyle/references/project-config.md | 8 ++++---- .../skills/dotnet-codestyle/references/project-config.md | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.agents/skills/dotnet-codestyle/references/project-config.md b/.agents/skills/dotnet-codestyle/references/project-config.md index 98a7141af..d07ba1a40 100644 --- a/.agents/skills/dotnet-codestyle/references/project-config.md +++ b/.agents/skills/dotnet-codestyle/references/project-config.md @@ -5,10 +5,10 @@ `true` only in a ``, placed in the `.csproj` after it sets `PublishAot` or in `Directory.Build.targets`, never in `Directory.Build.props`, which is imported - before the project body and so sees `PublishAot` empty. Reference verification reports - `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that - into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog - sinks, so it runs only where an AOT publish needs it. + before the project body and so never sees a `PublishAot` the `.csproj` sets. Reference + verification reports `IL3058` for every dependency not built AOT-compatible, and + `TreatWarningsAsErrors` turns that into a failed build on ordinary dependencies such as + `System.CommandLine` and the Serilog sinks, so it runs only where an AOT publish needs it. 3. **Assembly information**: use semantic versioning, include SourceLink (`true`), embed untracked sources (`true`). diff --git a/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle b/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle index 0c4af7e65..3a4534e14 100644 --- a/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle +++ b/.claude-plugin/fleet-skills/.source-digests/dotnet-codestyle @@ -1 +1 @@ -5afa0d478af9ead5 +6afeadd6c65bfd8a diff --git a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md index 98a7141af..d07ba1a40 100644 --- a/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md +++ b/.claude-plugin/fleet-skills/skills/dotnet-codestyle/references/project-config.md @@ -5,10 +5,10 @@ `true` only in a ``, placed in the `.csproj` after it sets `PublishAot` or in `Directory.Build.targets`, never in `Directory.Build.props`, which is imported - before the project body and so sees `PublishAot` empty. Reference verification reports - `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that - into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog - sinks, so it runs only where an AOT publish needs it. + before the project body and so never sees a `PublishAot` the `.csproj` sets. Reference + verification reports `IL3058` for every dependency not built AOT-compatible, and + `TreatWarningsAsErrors` turns that into a failed build on ordinary dependencies such as + `System.CommandLine` and the Serilog sinks, so it runs only where an AOT publish needs it. 3. **Assembly information**: use semantic versioning, include SourceLink (`true`), embed untracked sources (`true`). diff --git a/.github/skills/dotnet-codestyle/references/project-config.md b/.github/skills/dotnet-codestyle/references/project-config.md index 98a7141af..d07ba1a40 100644 --- a/.github/skills/dotnet-codestyle/references/project-config.md +++ b/.github/skills/dotnet-codestyle/references/project-config.md @@ -5,10 +5,10 @@ `true` only in a ``, placed in the `.csproj` after it sets `PublishAot` or in `Directory.Build.targets`, never in `Directory.Build.props`, which is imported - before the project body and so sees `PublishAot` empty. Reference verification reports - `IL3058` for every dependency not built AOT-compatible, and `TreatWarningsAsErrors` turns that - into a failed build on ordinary dependencies such as `System.CommandLine` and the Serilog - sinks, so it runs only where an AOT publish needs it. + before the project body and so never sees a `PublishAot` the `.csproj` sets. Reference + verification reports `IL3058` for every dependency not built AOT-compatible, and + `TreatWarningsAsErrors` turns that into a failed build on ordinary dependencies such as + `System.CommandLine` and the Serilog sinks, so it runs only where an AOT publish needs it. 3. **Assembly information**: use semantic versioning, include SourceLink (`true`), embed untracked sources (`true`).