I created reusable templates from Azure DevOps yaml pipeline. The build.yaml you see below is one such template.
When I push code, the pipeline successfully runs on Azure DevOps without complaining. However Visual Studio Code complains as I hover on parameters or stages.
Property Stages is not allowed
Property parameters is not allowed
Am I missing any settings here? Why VS Code shows errors while azure devops runs the same successfully?


And interestingly, I have another template in the same directory, which does not show any such error messages. What am I missing? I restarted vs code, still same.

I observed this problem with both Visual Studio Code as well as Visual Studio 2022 Preview.
This lead me to think, I renamed the file build.yaml to build-stage.yaml. This fixed the issue finally. May be build is some keyword kind of thing internally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With