Scans cannot span jobs in azure pipelines

In my pipeline I get the error: “task was not executed prior to this task” at the Analyze step in our pipeline.
It is complaining that the prepare step was not executed, even though it was.

From what I can see, it no idea that the previous step was run because it was part of previous job within the same pipeline.

How can the results from the Prepare Step be made visible to other (or all) parts of the pipeline later on ?

There needs to be done in this case, as the the code coverage (coberta) files are generated in a job after the build, and the Analyze needs those files to process the code coverage.

Flow looks like this:

  • job: build
  • Run Sonar Prepare
  • Do build
  • artifact generation , etc…
  • job: test
    • setup unit testing
    • run code coverage checks
    • Run Sonar Analyze

That last Analyze throws an error as it has no idea Prepare has run.