Skip to content

Avalonia Designer - Source/Preview cross-referencing and selection not working in VS 2022 (.NET 8) #143

Description

@epikgit

Describe the bug

Description: I am experiencing a complete failure of the cross-referencing features (Source -> Preview and vice-versa) in the Avalonia XAML Designer.
Clicking on a markup element in the .axaml file does not highlight the element in the previewer, and selecting an element in the designer does not navigate to the corresponding code.

Furthermore, the Avalonia settings menu under Tools > Options > Avalonia appears nearly empty, showing only a "General" tab with very few basic layout options, suggesting the extension is failing to load its advanced design-time components.

Environment:

  • Visual Studio Version: Visual Studio 2022 Community
  • Avalonia NuGet Version: 11.3.9
  • Extension Avalonia for Visual Studio 1.11.1
  • Target Framework: .NET 8.0
  • Operating System: Windows 10/11

To Reproduce

Steps to Reproduce:

  • Open an Avalonia project with version 11.3.9.
  • Open any .axaml file (e.g., a UserControl with a TabControl/Grid).
  • Wait for the designer to finish the build and show the preview.
  • Click on any tag (like ) in the XAML editor.

Expected behavior

Actual Result: The previewer remains static. No blue highlight/border appears around the control.

Expected Result: The corresponding element should be highlighted in the preview pane.

Logs & Attempted Fixes:
Clean Rebuild: Performed a "Clean Solution" and manually deleted bin and obj folders.
Extension Reinstall: Verified the extension is "Avalonia for Visual Studio".

Avalonia version

11.3.9

OS

Windows

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions