Skip to content

Commit

Permalink
Fix NoTargets example for build incrementalism (#423)
Browse files Browse the repository at this point in the history
Fixes #422
  • Loading branch information
stan-sz authored Feb 23, 2023
1 parent ec6f1ba commit c066520
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/NoTargets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To have a project that just copies a file:
<FilesToCopy Include="files\**" />
</ItemGroup>

<Target Name="CopyFiles" BeforeTargets="AfterBuild">
<Target Name="CopyFiles" BeforeTargets="PrepareForRun">
<Copy
SourceFiles="@(FilesToCopy)"
DestinationFolder="$(OutDir)"
Expand All @@ -33,6 +33,7 @@ To have a project that just copies a file:
</Target>
</Project>
```
Note: to leverage build incrementalism through `FileWrites`, ensure the custom target runs `BeforeTargets="PrepareForRun"` as above.

Or a project that runs a tool:

Expand Down

0 comments on commit c066520

Please sign in to comment.