Skip to content

Order of AfterTargets/BeforeTargets is incorrect #2894

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions docs/msbuild/target-build-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ Targets must be ordered if the input to one target depends on the output of anot

4. Before a target is executed or skipped, if its `Condition` attribute was absent or did not evaluate to `false`, its `DependsOnTargets` targets are run.

5. Before a target is executed or skipped, any target that lists it in a `BeforeTargets` attribute is run.
5. Before a target is executed or skipped, any target that lists it in a `AfterTargets` attribute is run.

6. Before a target is executed, its `Inputs` attribute and `Outputs` attribute are compared. If MSBuild determines that any output files are out of date with respect to the corresponding input file or files, then MSBuild executes the target. Otherwise, MSBuild skips the target.

7. After a target is executed or skipped, any target that lists it in an `AfterTargets` attribute is run.
7. After a target is executed or skipped, any target that lists it in an `BeforeTargets` attribute is run.

## See also
- [Targets](../msbuild/msbuild-targets.md)