You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: