Azure Pipelines "Unrecognized value" Variable Reference
The pipeline compiler hit an expression value it could not recognize, usually a variable or function name that is undefined or misspelled.
What this error means
Validation fails with "Unrecognized value: X" pointing at a ${{ }} or $( ) expression. The run never starts.
azure-pipelines
/azure-pipelines.yml (Line: 6, Col: 14): Unrecognized value: 'buildConfig'. Located at position 1 within expression: buildConfigCommon causes
Undefined variable in a template expression
A ${{ variables.X }} reference does not exist at compile time.
Misspelled function or context
A typo in a function or context (parameters, variables) is not recognized.
Runtime variable used at compile time
A value only set at runtime is referenced in a compile-time ${{ }} expression.
How to fix it
Define and reference variables correctly
- Declare the variable, or use the right syntax: ${{ }} compile-time, $( ) runtime macro.
- Fix typos in function or context names.
azure-pipelines.yml
variables:
buildConfig: Release
steps:
- script: echo $(buildConfig)How to prevent it
- Keep compile-time and runtime expression syntax separate and define all referenced variables; validation catches unrecognized values before running.
Related guides
Azure Pipelines YAML Schema Validation ErrorFix the Azure Pipelines "azure-pipelines.yml schema validation" error where the YAML uses an unknown property…
Azure Pipelines "A mapping was not expected" YAML ErrorFix the Azure Pipelines "A mapping was not expected" / "Unexpected value" YAML error caused by indentation th…
Azure Pipelines "Stage name must be unique" ErrorFix the Azure Pipelines error where two stages or jobs share the same name, which the schema requires to be u…