I have a pipeline.yaml that looks like this 
pool:
  vmImage: image
stages:
  -stage: A
   jobs: 
     -job: a
      steps: 
     - script: |
          echo "This is stage build"
          echo "##vso[task.setvariable variable=doThing;isOutput=true]Yes"
        name: BuildStageRun
  -stage: B
   jobs:
      -job: b
       steps: #do something in steps
      -job: c
       dependsOn: a
       condition: eq(dependencies.build.outputs['BuildStageRun.doThing'], 'Yes')
       steps:
        - script: echo "I am scripting" 
So, there are 2 stages, A with one job a, and B with 2 jobs b and c. I would like to have job c executed only when job a has executed. I tried to do so by setting the variable doThing in job a to Yes and then check this variable in job c.
But I get an error:
Stage plan job c depends on unknown job a.
The varible definition and the definition of condition was taken from Azure documentation
Do you have any suggestion on how to get this working?