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

Ability to look ahead for tasks that will be executed #1914

Closed
mdesousa opened this issue Nov 10, 2017 · 2 comments
Closed

Ability to look ahead for tasks that will be executed #1914

mdesousa opened this issue Nov 10, 2017 · 2 comments

Comments

@mdesousa
Copy link

I would like to run certain tasks differently depending on which tasks will be executed later in the build. This would allow me to optimize the execution by looking ahead at what will be required.
For example, if I have a "Build" task that is going to invoke MSBuild, I would like to default the configuration to "Release" if I see that later the build needs to execute a "Publish" task. If that won't be the case, the MSBuild can run in "Debug" mode which in our case executes a lot faster.
I figured that I could achieve this if I could get access to the execution graph... then do something like this:

if (targetTask.DependsOn(publishTask)) configuration = "Release" else configuration = "Debug";

Maybe this is possible already? I could not find a way to query the dependency graph. Thanks!

@jnm2
Copy link
Contributor

jnm2 commented Nov 10, 2017

I've been asking for exactly this kind of thing: #1772

@mdesousa
Copy link
Author

mdesousa commented May 31, 2018

Looks like #1772 has been resolved, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants