XAML errors and warnings
When authoring XAML, Visual Studio analyzes the code as you type. A squiggle appears on a line of code when an error is detected. Hovering over the squiggle gives you more information about the error or warning. For some errors and warnings, a Quick Action lightbulb is displayed, and using the Ctrl+. keyboard shortcut displays the options to fix the issue.
Error types
Behind the scenes, multiple tools analyze the XAML in parallel. XAML errors are categorized into one of the following three types, based on the tool that detected the error:
Error detected by | Error code format | Visual Studio Version |
---|---|---|
XAML Language Service (XAML editor) | XLSxxxx | All Versions |
XAML Designer | XDGxxxx | All Versions |
XAML Edit & Continue | XECxxxx | Visual Studio 2019 version 16.1 or earlier |
XAML Hot Reload | XHRxxxx | Visual Studio 2019 version 16.2 or later |
For more details on the rebranding of XAML Edit & Continue as XAML Hot Reload, see our release notes
Note
Not all errors or warnings have a corresponding code. Such errors are usually XAML Designer errors.
Suppress XAML Designer errors
Open the Options dialog by selecting Tools > Options, and then select Text Editor > XAML > Miscellaneous.
Uncheck the Show errors detected by the XAML designer check box.