Skip to content

Commit 07fa95d

Browse files
blehnenclaude
andcommitted
Add CI=true requirement for NuGet release builds to CLAUDE.md
Without -p:CI=true, Source Link paths aren't deterministic and NuGet.org shows red validation indicators on published packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3a441b7 commit 07fa95d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ dotnet build "Source\DotNetWorkQueueNoTests.sln" -c Debug
1919
dotnet build "Source\DotNetWorkQueue\DotNetWorkQueue.csproj"
2020
```
2121

22-
Release builds enable `TreatWarningsAsErrors` and XML documentation generation.
22+
Release builds enable `TreatWarningsAsErrors` and XML documentation generation. For NuGet release builds, always pass `-p:CI=true` to enable deterministic Source Link paths:
23+
24+
```bash
25+
# Release build for NuGet publishing
26+
dotnet build "Source\DotNetWorkQueueNoTests.sln" -c Release -p:CI=true
27+
28+
# Pack Dashboard.Ui (not auto-packed by build)
29+
dotnet pack "Source\DotNetWorkQueue.Dashboard.Ui\DotNetWorkQueue.Dashboard.Ui.csproj" -c Release -p:CI=true
30+
```
2331

2432
## Running Tests
2533

@@ -123,6 +131,7 @@ Projects target net10.0 and net8.0. Legacy conditional compilation symbols (NETF
123131
- `RedisValue.Null` cast to `(int)` yields `0`, not an exception. When comparing against enums where `0` is a valid member (e.g., `MessageHistoryStatus.Enqueued`), always check `.HasValue` before casting to avoid null-value collisions.
124132
- NuGet version ordering: `0.9.3` < `0.9.19`, so you can't go back to a lower version number after incrementing past it.
125133
- NuGet.org does not allow pushing `.snupkg` separately after the `.nupkg` is already published, and re-pushing the same version is blocked. Always push from the deploy directory using `dotnet nuget push "deploy/*.nupkg" --api-key KEY --source https://api.nuget.org/v3/index.json` — the CLI automatically picks up matching `.snupkg` files from the same directory.
134+
- Release builds for NuGet must use `-p:CI=true` (e.g., `dotnet build -c Release -p:CI=true`) to enable `ContinuousIntegrationBuild` in Directory.Build.props. Without it, Source Link paths aren't deterministic and NuGet.org shows red validation indicators.
126135

127136
## Code Quality
128137
- Prefer correct, complete implementations over minimal ones.

0 commit comments

Comments
 (0)