Skip to content

Commit 4c0d5d6

Browse files
committed
Centralize NuGet README metadata
1 parent a3df686 commit 4c0d5d6

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ If no new rule is detected -> do not update the file.
168168
- Keep public API and naming aligned with package/namespace `ManagedCode.CodexSharpSDK`.
169169
- Solution/workspace file naming must use `ManagedCode.CodexSharpSDK` prefix for consistency with package identity.
170170
- Keep package/version metadata centralized in `Directory.Build.props`; avoid duplicating version structure or release metadata blocks in individual `.csproj` files unless a project-specific override is required.
171+
- Keep shared NuGet package metadata such as `PackageReadmeFile` in global `Directory.Build.props` for packable projects; do not duplicate it in individual `.csproj` files because package presentation must stay consistent across packages.
171172
- Never hardcode guessed Codex/OpenAI model names in tests, docs, or defaults; verify supported models and active default via Codex CLI first.
172173
- Before setting or changing any `Model` value, read available models and current default from the local `codex` CLI in the same environment/account and only then update code/tests/docs.
173174
- Model identifiers in code/tests must come from centralized constants or a shared resolver helper; do not inline model string literals repeatedly.

Directory.Build.props

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
</PropertyGroup>
1818

19+
<PropertyGroup>
20+
<RepositoryReadmeFileName>README.md</RepositoryReadmeFileName>
21+
<RepositoryReadmeFilePath>$(MSBuildThisFileDirectory)$(RepositoryReadmeFileName)</RepositoryReadmeFilePath>
22+
</PropertyGroup>
23+
1924
<!-- NuGet package metadata and versioning -->
2025
<PropertyGroup>
2126
<Authors>ManagedCode</Authors>
@@ -24,16 +29,19 @@
2429
<RepositoryUrl>https://github.com/managedcode/CodexSharpSDK</RepositoryUrl>
2530
<PackageProjectUrl>https://github.com/managedcode/CodexSharpSDK</PackageProjectUrl>
2631
<PackageLicenseExpression>MIT</PackageLicenseExpression>
27-
<PackageReadmeFile>README.md</PackageReadmeFile>
2832
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2933
<EmbedUntrackedSources>true</EmbedUntrackedSources>
3034
<EnablePackageValidation>true</EnablePackageValidation>
3135
<Version>0.1.3</Version>
3236
<PackageVersion>$(Version)</PackageVersion>
3337
</PropertyGroup>
3438

35-
<ItemGroup>
36-
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="/" Visible="false" />
39+
<PropertyGroup Condition="'$(IsPackable)' != 'false'">
40+
<PackageReadmeFile>$(RepositoryReadmeFileName)</PackageReadmeFile>
41+
</PropertyGroup>
42+
43+
<ItemGroup Condition="'$(IsPackable)' != 'false'">
44+
<None Include="$(RepositoryReadmeFilePath)" Pack="true" PackagePath="/" Visible="false" />
3745
</ItemGroup>
3846

3947
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true' or '$(CI)' == 'true' or '$(TF_BUILD)' == 'true'">

0 commit comments

Comments
 (0)