[X] I have verified this is the correct repository for opening this issue.
[X] I have verified no other issues exist related to my problem.
[X] I have verified this is not an issue for a specific package.
[X] I have verified this issue is not security related.
[X] I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
When running the build.bat for a project that is running Chocolatey.Cake.Recipe, and is making use of the RunDotNet entry point, the tasks for SonarQube are not run at the right time. In addition, tasks that should not be run, are run, for example Build and Restore.
This is due to the fact that the DAG of dependencies is being constructed at runtime, based on whether RunDotNet or Run is called, and as a result, the hard-coded dependencies for the SonarQube tasks are not being altered when they should be.
What is Expected?
The required dependencies should be run, in the correct order, to ensure that all the necessary tasks are completed as part of the build.
How Did You Get This To Happen?
On a project that is using Chocolatey.Cake.Recipe and makes use of RunDotNet run the build.bat file
This will run the build
Assuming that it runs to completion, look at all the Tasks that were run
You will see that the Initialize-SonarQube task runs near the end of the list, when it should be near the top
Also not that it runs the Build and Restore tasks, which should not be run, instead, only the DotNetBuild and DotNetRestore tasks should be run
Checklist
What You Are Seeing?
When running the
build.bat
for a project that is running Chocolatey.Cake.Recipe, and is making use of theRunDotNet
entry point, the tasks for SonarQube are not run at the right time. In addition, tasks that should not be run, are run, for exampleBuild
andRestore
.This is due to the fact that the DAG of dependencies is being constructed at runtime, based on whether
RunDotNet
orRun
is called, and as a result, the hard-coded dependencies for the SonarQube tasks are not being altered when they should be.What is Expected?
The required dependencies should be run, in the correct order, to ensure that all the necessary tasks are completed as part of the build.
How Did You Get This To Happen?
RunDotNet
run thebuild.bat
fileInitialize-SonarQube
task runs near the end of the list, when it should be near the topBuild
andRestore
tasks, which should not be run, instead, only theDotNetBuild
andDotNetRestore
tasks should be runSystem Details
Installed Packages
Output Log
Additional Context
N/A