.squad/skills/nuget-packaging/SKILL.md
NuGet packaging patterns for the Aspire.Hosting.Minecraft package
npx skillsauth add csharpfritz/aspire-minecraft nuget-packagingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
These patterns apply to the single NuGet package produced by this repo: Fritz.Aspire.Hosting.Minecraft (PackageId). The RCON library (Aspire.Hosting.Minecraft.Rcon) is embedded into this package. The Worker project is not packaged — it runs as a standalone service. They ensure packages are NuGet.org-ready with reproducible builds.
Only Aspire.Hosting.Minecraft is packable (IsPackable=true). The Rcon project is embedded via PrivateAssets="All" on the ProjectReference plus TargetsForTfmSpecificBuildOutput to include the DLL in the lib folder. The Worker project is IsPackable=false — it's a standalone service consumers reference directly.
All PackageReference entries must have exact pinned versions (e.g., Version="13.1.0"). Never use Version="*" or version ranges. NuGet.org rejects packages with floating version references and they break reproducible builds.
Shared metadata (Authors, License, RepositoryUrl) and build hardening properties live in Directory.Build.props at the repo root. Individual csproj files only add project-specific properties (PackageId, Version, Description, PackageTags, IsPackable).
Every packable project inherits these from Directory.Build.props:
GenerateDocumentationFile — ships XML docs in the nupkgEnablePackageValidation — catches breaking API changes between versionsDeterministic — ensures byte-identical builds from same sourceContinuousIntegrationBuild (CI-only) — embeds correct source paths for SourceLinkEmbedUntrackedSources — ensures all source files are available in SourceLinkMicrosoft.SourceLink.GitHub — enables debugger source mapping to GitHubThe single packable project (Aspire.Hosting.Minecraft) has its own README.md in the project directory, included in the nupkg via:
<None Include="README.md" Pack="true" PackagePath="\" />
The PackageReadmeFile property in Directory.Build.props is set to README.md. Non-packable projects do not pack READMEs.
dotnet restore
dotnet build -c Release
dotnet pack -c Release -o nupkgs
Check for: zero warnings on src projects, correct package sizes, no floating versions in generated nuspec.
Version="*" — will be rejected by NuGet.org and breaks reproducibilityEnablePackageValidation — won't catch breaking API changes between releasesMicrosoft.NET.Sdk.Worker and runs as a separate process; it can't be a DLL inside the hosting packagetools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
tools
Techniques for visually connecting water bodies (canals, lakes, rivers) in Minecraft
development
# Static Configuration Pattern **Confidence:** low **Source:** earned ## When to Use When a class has compile-time constants (`const`) that need to become runtime-configurable without breaking existing consumers. ## Pattern 1. Convert `const` fields to `static T { get; private set; } = <original value>`. 2. Add a public `Configure*()` method that sets the new values. Call once at startup. 3. Add an `internal static Reset*()` method that restores defaults — needed for test isolation since `p
development
Core conventions and patterns used in the Squad codebase