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

Target is executed even when AfterTargets are skipped #5858

Open
TFTomSun opened this issue Nov 5, 2020 · 1 comment
Open

Target is executed even when AfterTargets are skipped #5858

TFTomSun opened this issue Nov 5, 2020 · 1 comment

Comments

@TFTomSun
Copy link

TFTomSun commented Nov 5, 2020

Given is a target definition like this:

<Target Name="TestIssueTarget" AfterTargets="GenerateNuspec">
      <Message Text="TestIssueTarget was executed"></Message>
    </Target>

If GenerateNuspec was skipped, because everything is up to date, I would expect the TestIssueTarget to be skipped as well. Unfortunately thats not the case. The TestIssueTarget is always executed, even if the build system detected that GenerateNuspec can be skipped.

If this is the intended behavior, how can I achieve what I am aiming to?

@TFTomSun TFTomSun added bug needs-triage Have yet to determine what bucket this goes in. labels Nov 5, 2020
@benvillalobos
Copy link
Member

benvillalobos commented Nov 11, 2020

Team Triage: This is by design because the idea behind incremental build is that it doesn't matter if it executed or not, what matters is whether the inputs are newer than the outputs (checked via timestamp). So whether a target skipped is not observable outside that target. What you can do is add inputs and outputs to your target with an input that is output by the GenerateNuspec target.

@benvillalobos benvillalobos added question and removed bug needs-triage Have yet to determine what bucket this goes in. labels Nov 11, 2020
@benvillalobos benvillalobos added this to the Discussion milestone Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants