Skip to content

Commit 22c4633

Browse files
authored
[docs] Add $(IncrementalCleanDependsOn) property tip (#9552)
1 parent 832a4f1 commit 22c4633

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Documentation/guides/MSBuildBestPractices.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,10 +727,11 @@ as:
727727
</Target>
728728
```
729729

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

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

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

0 commit comments

Comments
 (0)