Skip to content

Commit

Permalink
[docs] Add $(IncrementalCleanDependsOn) property tip (#9552)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzabroski authored Nov 26, 2024
1 parent 832a4f1 commit 22c4633
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Documentation/guides/MSBuildBestPractices.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,11 @@ as:
</Target>
```

There is no `$(IncrementalCleanDependsOn)` property, what do you do?
Then use the [`$(IncrementalCleanDependsOn)` property used in `Microsoft.Common.CurrentVersion.targets`][msbuild_incrementalcleandependson].

Since using `BeforeTargets` and `AfterTargets` is a no-no, we have
modified `$(CoreBuildDependsOn)` so you can run a target *before*
If you are on an older version of the SDK where `$(IncrementalCleanDependsOn)` property defined is not used, *and*
since using `BeforeTargets` and `AfterTargets` is a no-no, you can instead
modify `$(CoreBuildDependsOn)` to run a target *before*
`IncrementalClean`:

```xml
Expand Down Expand Up @@ -758,3 +759,4 @@ See the following links about this problem:
[clean]: https://github.com/Microsoft/msbuild/issues/2408#issuecomment-321082997
[msbuild_issue]: https://github.com/Microsoft/msbuild/issues/3916
[msbuild_repro]: https://github.com/jonathanpeppers/MSBuildIncrementalClean
[msbuild_incrementalcleandependson]: https://github.com/dotnet/msbuild/commit/fdddb27ebec8f6a51513b6e869f039a32d3a8c39

0 comments on commit 22c4633

Please sign in to comment.