Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Skill 15 - Packaging, Publishing, NuGet, and AOT
.NET Components
- Apps produce runnable outputs.
- Class libraries produce reusable assemblies.
- NuGet packages distribute libraries and tools.
- Project files define dependencies, target frameworks, build behavior, and publish behavior.
Package Rules
- Keep package references minimal.
- Prefer central package management for multi-project repos.
- Pin versions according to team policy.
- Review transitive dependencies.
- Do not publish packages with secrets, local paths, or machine-specific config.
- Include useful metadata: package ID, version, authors, license, repository URL, description, release notes.
Publishing Rules
- Choose framework-dependent deployment when the target runtime is managed separately.
- Choose self-contained deployment when deployment must carry the runtime.
- Use single-file publishing only after testing startup, extraction behavior, and diagnostics.
- Use trimming carefully; test reflection-heavy code.
- Use native AOT for startup/memory-sensitive apps only after checking compatibility.
Versioning Rules
- Use semantic versioning for public packages.
- Communicate breaking changes.
- Keep public APIs stable.
- Prefer additive changes when possible.
Commands
dotnet pack -c Release
dotnet publish -c Release
dotnet nuget push <package.nupkg> --source <source>