Ready-to-copy starter files for a repository adopting the playbook. Each file here is the version that
already exists in this repository, with Acme standing in for your own namespace prefix.
| Template | Copy to | Profile |
|---|---|---|
global.json |
global.json |
All |
Directory.Packages.props |
Directory.Packages.props |
All |
Directory.Build.props |
src/Directory.Build.props |
All |
Directory.Build.targets |
src/Directory.Build.targets |
All |
purview-build.json |
.config/purview-build.json |
All |
dotnet-tools.json |
.config/dotnet-tools.json |
All |
pr.yml |
.github/workflows/pr.yml |
All |
release.yml |
.github/workflows/release.yml |
All |
AGENTS.md |
AGENTS.md |
All |
mkdocs.yml |
mkdocs.yml |
All |
TestBuilder.cs |
src/tests/SharedTestingInfra/Builders/TestBuilder.cs |
Medium and up |
architecture-policy.json |
.config/architecture-policy.json |
Medium and up |
- Pick a profile. Profiles below says which files each one needs.
- Replace
Acme. It appears inDirectory.Build.props(asNamespacePrefix), in the names inAGENTS.md, and in the paths inpurview-build.json. - Pin the versions. The SDK version in
global.jsonand the package versions inDirectory.Packages.propsare the ones this repository builds with today, plus one illustrative package family (Purview.Containers) you delete if you do not use it. Check them against the SDK's current release before you commit. - Read the comment in each file. Every template explains the one thing about it that is easy to get
wrong — the order of the
NamespacePrefixand the import, theNU1010trap, why the workflow repeats the test filter that is already in the JSON. - Delete what you do not need. A template you keep but do not understand is worse than a file you wrote.
The files are deliberately not a scaffolding tool. There is no generator, no placeholder syntax and no template engine, because a file you copy and edit is a file you have read, and the whole point of the playbook is that the conventions are understood rather than applied.
global.json
Directory.Packages.props
src/Directory.Build.props
src/Directory.Build.targets
purview-build.json
dotnet-tools.json
pr.yml
AGENTS.md
mkdocs.yml
Then create src/src/<Project>/<Project>.csproj and src/tests/<Project>.UnitTests/<Project>.UnitTests.csproj
as two empty <Project Sdk="Microsoft.NET.Sdk"></Project> files, and add both to src/Acme.slnx.
Skip TestBuilder.cs until you have a domain type worth building; add it with the first test that needs one,
which is usually the first test.
Everything in Small, plus:
TestBuilder.csinsrc/tests/SharedTestingInfra/Builders/.- One test project per layer, named
*.UnitTests. architecture-policy.jsonin.config/, and one test class deriving fromPurviewArchitectureTests(thePurview.Architecture.Testingpackage) so a wrongProjectReferencefails the build — see Project Responsibilities and Architecture as Tests.- A second CI job for any suite that needs a real resource.
Everything in Medium, plus:
Sdk/README.mdandSdk/buildTransitive/**per packable project.PackValidationinpurview-build.json, withRequiredContentas an exhaustive manifest.run-pack: trueandvalidate-pack: trueinpr.yml.- A consumer-verification script and a
just verify-consumersrecipe. release-mode: NuGetinrelease.yml.
.editorconfig,.gitignore,.gitattributes. The SDK bootstraps.editorconfigto the repository root on the first build. Take the other two from the SDK'stemplates/folder so they stay in step with it.- A solution file. Its shape depends on your project list, and a template with the wrong paths in it is a template that fails on the first build. The shape is in Getting Started.
Justfile. It is worth writing rather than copying: the recipes are the list of things you actually do, and a copied list of things somebody else does is noise.