I was working on a project and one of the view models needed a different constructor to initialize it properly. After putting the required constructor, the VSIX extension thew an error that it couldn't find ViewModel();. After putting the required constructor, the VSIX extension throws an error, but I don't see it in the Error List. The app compiles normally.
To Reproduce
Create a new Avalonia project.
Add a variable for the second constructor to initialize.
Edit the MainWindowViewModel.cs so it has two constructors (one without parameters and another that initializes the variable).
AvaloniaVS plugin version
11.1
Avalonia version
11.0.4
Visual Studio version
17.7.1
Relevant log output
20:01:01.387 [Information] Starting previewer process for '"E:\repos\Dragonhouse.RMCookToolDeluxe\artifacts\bin\Dragonhouse.RMCookToolDeluxe.GUI\debug\Dragonhouse.RMCookToolDeluxe.GUI.dll"'
20:01:01.428 [Information] 153132 Started previewer process for '"E:\repos\Dragonhouse.RMCookToolDeluxe\artifacts\bin\Dragonhouse.RMCookToolDeluxe.GUI\debug\Dragonhouse.RMCookToolDeluxe.GUI.dll"'. Waiting for connection to be initialized.
20:01:02.229 [Information] 153132 Connection initialized
20:01:06.595 [Error] 153132 UpdateXamlResult error
System.Xaml.XamlException: Object reference not set to an instance of an object.
Additional context
I was able to check this in a .NET 8 project. Haven't tested on older versions. The necessary xaml code for datacontext is present.
Describe the bug
I was working on a project and one of the view models needed a different constructor to initialize it properly. After putting the required constructor, the VSIX extension thew an error that it couldn't find
ViewModel();
. After putting the required constructor, the VSIX extension throws an error, but I don't see it in the Error List. The app compiles normally.To Reproduce
AvaloniaVS plugin version
11.1
Avalonia version
11.0.4
Visual Studio version
17.7.1
Relevant log output
Additional context
I was able to check this in a .NET 8 project. Haven't tested on older versions. The necessary xaml code for datacontext is present.