
Description
Target Authoring is an agent skill with canonical patterns for writing custom MSBuild targets. The patterns come from Microsoft.Common.CurrentVersion.targets in the MSBuild repository, so the agent works from the same structure the SDK uses. The skill explains the three-level target chain. Build, Rebuild and Clean each delegate to a property that lists their dependencies, and those dependencies run through BeforeBuild, CoreBuild and AfterBuild, placed in the BuildDependsOn property group. Knowing that chain is what lets a custom target hook in at the right point instead of breaking the build. The skill is for two jobs: diagnosing and fixing custom target authoring anti-patterns in a project file or props file, and repairing SDK target chains that break across the build. The agent is expected to follow the canonical pattern rather than inventing its own hooks. Use it when a custom MSBuild target runs in the wrong order, never runs, runs too often, or when a build that used to work stops calling the targets it depends on. The skill is part of the public dotnet/skills repository on GitHub.…
Highlights
- Canonical custom MSBuild target patterns
- Explains the Build, Rebuild and Clean target chain
- Fixes target ordering and anti-patterns
- Repairs broken SDK target chains
Ratings & Reviews
No ratings yet
Be the first to rate target-authoring.
People also visit
target-authoring FAQ
What is an MSBuild target?
A named step in the build. The skill covers how custom targets should be written so they run at the right point in the SDK build chain.
Where do the patterns come from?
The skill says they are taken from Microsoft.Common.CurrentVersion.targets in the MSBuild repository.
How do I install it?
Run npx skills add https://github.com/dotnet/skills --skill target-authoring in your project.
Is it free and open source?
Yes. It is published in the public dotnet/skills repository on GitHub.
What do the security audits say?
skills.sh lists Gen Agent Trust Hub: Pass, Socket: Pass and Snyk: Pass for this skill.
What are the best target-authoring alternatives?
Popular alternatives to target-authoring include including-generated-files, property-patterns and extension-points. See all target-authoring alternatives










