Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code showing error: Property Stages is not allowed, Property parameters is not allowed

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?

Property parameters is not allowed error shown by VS Code

Property stages is not allowed error shown by VS Code

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.

VS Code showing no error with another yaml azure devops template

like image 829
VivekDev Avatar asked Nov 18 '25 22:11

VivekDev


1 Answers

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.

like image 200
VivekDev Avatar answered Nov 22 '25 03:11

VivekDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!