ada-dotnet-nuget-packaging

Publishes .NET libraries as NuGet packages with embedded assemblies, CPM versioning, and consumer verification.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-dotnet-nuget-packaging-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-dotnet-nuget-packaging
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-dotnet-nuget-packaging
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-dotnet-nuget-packaging-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Publishing a .NET library as a NuGet package involves many failure-prone details: stale dependency graphs after adding PrivateAssets, version strings scattered across four files, package READMEs frozen at publish time, and CI pack jobs that pass without ever exercising the nupkg. This Skill encodes the verified workflows and pitfalls so a release ships a correct, consumable package. ## Core Features & Use Cases - Single-package distribution: Embed a domain DLL into an RCL nupkg with PrivateAssets="all" and Pack="true", with the mandatory clean-restore step and nuspec verification. - Central Package Management guidance: Edit the correct Directory.Packages.props (root vs. subdirectory override) and keep all four version touchpoints in sync to avoid NU1102 failures. - Package README authoring: Write consumer-focused package-readme.md with public-only Quick Start types, absolute doc links, one-line paragraphs, and no trailing blank line. - Release and publish workflow: Pack with -p:Version, inspect the nupkg contents, verify a consumer demo resolves the exact version, and push to nuget.org or GitHub Packages. - Use Case: Preparing a Blazor RCL library release — bump the version in props, script, CI, and readme, pack with a clean restore, verify the demo consumes the packed nupkg, then publish and attach the nupkg to a GitHub Release. ## Quick Start Ask the agent to prepare and publish version 0.2.0 of your .NET library as a NuGet package, including updating the package README and verifying the demo consumer resolves it.

Frequently Asked Questions about ada-dotnet-nuget-packaging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a .NET library as a NuGet package?

Override the dev version at pack time with -p:Version=X.Y.Z, run a clean restore first, then dotnet pack in Release mode. Inspect the nupkg contents, verify a consumer project resolves the exact version, and push with dotnet nuget push to nuget.org.

How do I embed a referenced DLL into a single NuGet package?

Set PrivateAssets="all" on the ProjectReference and add a None item with Pack="true" pointing at the built DLL. You must delete obj folders and restore cleanly before packing, or the stale dependency graph still lists the embedded project in the nuspec.

Why does my CI pack job fail with NU1102 after a version bump?

NU1102 means the version was not bumped in all four touchpoints: the demo's Directory.Packages.props, the republish script, the CI pack step's -p:PackageVersion, and the package README snippet. Grep the whole repo for the old version string before opening the release PR.

Does Central Package Management allow subdirectory version overrides?

Yes, a subdirectory can have its own Directory.Packages.props that overrides the root one for projects under it. Multi-solution repos commonly pin a consumer demo's package version this way; editing the root props has no effect on that demo.

How do I publish a NuGet package to GitHub Packages?

GitHub Packages requires a classic PAT with write:packages scope; fine-grained PATs are not supported. Add the source to the user-level NuGet config (not the repo's), push with --api-key, and note the first publish defaults to private visibility.

Why does my packed package ship a stale JavaScript bundle?

If the RCL's wwwroot bundle is gitignored, plain dotnet pack ships stale or missing assets. Add an incremental MSBuild target with Inputs bound to a real ItemGroup of TS sources — raw glob strings in Inputs never expand, so the incremental check never skips.