| title | BCP057 |
|---|---|
| description | The name <name> doesn't exist in the current context. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when the referenced name doesn't exist, either due to a typo or because it hasn't been declared. If it's a typo, you'll encounter BCP082 when the compiler identifies and suggests a similarly named symbol.
The name <name> does not exist in the current context.
Error
Fix the typo or declare the symbol.
The following example raises the diagnostic because bar has never been declared:
var foo = bar The following example raises the diagnostic because bar1 is a typo:
var bar = 'white'
var foo = bar1 You can fix the diagnostic by declaring bar, or fix the typo.
var bar = 'white'
var foo = bar For more information about Bicep diagnostics, see Bicep core diagnostics.