Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents canonical MSBuild custom target patterns: DependsOnTargets chains, Inputs/Outputs incrementality, Returns, and FileWrites.
91% 100%+9 ptsof test cases passed
Passed 23 of 23 test cases with the skill, and 21 of 23 without it.
I am authoring an MSBuild target that prepares output directories and checks environment variables before compilation starts. What target naming convention applies to this stage?
Prefixes the target name with Prepare.
3 of 3 safety checks passed
Canonical patterns from Microsoft.Common.CurrentVersion.targets in the MSBuild repository.
Every major entry point (Build, Rebuild, Clean) delegates to a property listing its dependencies, which chains through Before → Core → After:
<PropertyGroup>
<BuildDependsOn>
BeforeBuild;
CoreBuild;
AfterBuild
</BuildDependsOn>
</PropertyGroup>
<Target Name="Build"
Condition=" '$(_InvalidConfigurationWarning)' != 'true' "
DependsOnTargets="$(BuildDependsOn)"
Returns="@(TargetPathWithTargetPlatformMoniker)" />
<!-- Empty extensibility targets — users override these -->
<Target Name="BeforeBuild" />
<Target Name="AfterBuild" />
CoreBuild delegates to $(CoreBuildDependsOn) and includes error handlers:
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)">
<OnError ExecuteTargets="_TimeStampAfterCompile;PostBuildEvent"
Condition="'$(RunPostBuildEvent)' == 'Always'" />
<OnError ExecuteTargets="_CleanRecordFileWrites" />
</Target>
DependsOnTargets="$(MyTargetDependsOn)"), not hardcoded targets.Next to this one in the catalogue, plus more from the same author.