Shared MSBuild settings for .NET repositories that publish NuGet packages: nuget.org-ready package metadata with build-time checks, versions from release tags, and Microsoft.Testing.Platform tests with coverage. Installed as plain files you can read and review, updated by one script.
- Packages that pass nuget.org's rules by default. Licence, icon, README, Source Link, symbols, repository and release-notes links, package validation and NuGet audit; nineteen
MSKITPKGchecks run ondotnet pack, warnings on your machine and errors on CI. Packaging - One README for the repository and its packages.
MSKit_PackageReadmeFrom=README.mdgenerates each package's readme on pack, with links pinned to the commit. Package readme - Versions from release tags. Tag
v1.4.0and the packages are1.4.0; branch builds are1.4.0-ci.<run>, pull requests1.4.0-pr.<n>.<run>, local builds9999.0.0. Versioning - Tests on Microsoft.Testing.Platform v2. Projects named
*.Testsbecome xUnit v3 test projects with coverage, TRX and JUnit reports, an assertion library and NSubstitute. Testing - Build checks that keep a repository consistent. Target frameworks declared once, banned packages, prerelease dependencies on a stable branch,
TreatWarningsAsErrorsdrift. Build defaults and checks - Plain files, one update script. The kit lives in your repository's
.toolkit/folder, so every change shows up in a pull request;update.sh/update.ps1install a release after checking its SHA-256. It is not a NuGet package or an MSBuild SDK: nothing is restored at build time. Install and update
From the repository root, with a POSIX shell or PowerShell 7:
curl -fsSLO https://github.com/DragoAnt/MSBuildKit/releases/latest/download/update.sh
sh update.sh && rm update.shInvoke-WebRequest https://github.com/DragoAnt/MSBuildKit/releases/latest/download/update.ps1 -OutFile update.ps1
pwsh ./update.ps1; Remove-Item update.ps1Then declare the next version in Directory.Version.props and commit .toolkit/. Getting started walks through the first build, test and pack; samples/MinimalLibrary is a complete repository with every check passing.
docs/README.md lists the pages in reading order. Every property is in the property reference, every warning and error in the code reference. Coming from MSBuild.Routine: migration guide.
See CONTRIBUTING.md. Changes are listed in CHANGELOG.md.