Skip to content
Latchkey

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: buildConfig

Common 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

  1. Declare the variable, or use the right syntax: ${{ }} compile-time, $( ) runtime macro.
  2. 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →