Describe the bug
The Avalonia for VSCode extension is currently unable to resolve properties generated by CommunityToolkit.Mvvm (e.g., properties created via the [ObservableProperty] attribute).
While the project builds and runs successfully without any errors, the VS Code editor displays false-positive red squiggly lines (IntelliSense errors) indicating that these generated properties do not exist in the ViewModel.
To Reproduce
- Create project with Avalonia.Mvvm template:
dotnet new avalonia.mvvm -o MyAvaloniaApp
- Change the
Greeting variable in MainWindowViewModel.cs into a generated one:
[ObservableProperty]
public string _greeting = "Welcome to Avalonia!";
The {Text="{Binding Greeting}"} in MainWindow.axaml shows error: The property 'Greeting' does not exist on 'MyAvaloniaApp.ViewModels.MainWindowViewModel'.Avalonia(MC3073)
Product(s)
Avalonia for Code
Platform
macOS
License Tier
Community
Avalonia version
12.0.2
Tool/Control Version
12.2.0
Relevant log output
Additional context
No response
Describe the bug
The Avalonia for VSCode extension is currently unable to resolve properties generated by CommunityToolkit.Mvvm (e.g., properties created via the [ObservableProperty] attribute).
While the project builds and runs successfully without any errors, the VS Code editor displays false-positive red squiggly lines (IntelliSense errors) indicating that these generated properties do not exist in the ViewModel.
To Reproduce
dotnet new avalonia.mvvm -o MyAvaloniaAppGreetingvariable inMainWindowViewModel.csinto a generated one:The
{Text="{Binding Greeting}"}inMainWindow.axamlshows error:The property 'Greeting' does not exist on 'MyAvaloniaApp.ViewModels.MainWindowViewModel'.Avalonia(MC3073)Product(s)
Avalonia for Code
Platform
macOS
License Tier
Community
Avalonia version
12.0.2
Tool/Control Version
12.2.0
Relevant log output
Additional context
No response