Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $(IncrementalCleanDependsOn) property tip #9552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Documentation/guides/MSBuildBestPractices.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ First, I would read up on the [Clean target][clean] and understand how
any file produced by a previous build. It does *not* simply delete
`bin` and `obj`.


`IncrementalClean` has the job of deleting "extra files" that might be
hanging out in `$(IntermediateOutputPath)`. So it might happily go
delete your stamp file, and completely break your incremental build!
Expand Down Expand Up @@ -727,7 +728,7 @@ as:
</Target>
```

There is no `$(IncrementalCleanDependsOn)` property, what do you do?
Then use the `$(IncrementalCleanDependsOn)` property defined in the Microsoft.Common.CurrentVersion.targets. If you are on an older version of the SDK where `$(IncrementalCleanDependsOn)` property defined is not defined, what do you do?

Since using `BeforeTargets` and `AfterTargets` is a no-no, we have
modified `$(CoreBuildDependsOn)` so you can run a target *before*
Expand Down