AvaloniaVS
AvaloniaVS copied to clipboard
When compiling with a multi-target framework, Avalonia's window UI does not preview properly
Describe the bug
I use the class library of frmework4.8 with net8.0 multi-target framework, where frmework4.8's UI designer works fine, but Avalonia's UI can't be previewed, but the project compiles normally.
To Reproduce
类库框架的项目设置为
VS上的错误像这样
Expected behavior
It will be the same as what I see in my photo, the UI can't be previewed, but it compiles fine
Avalonia version
11.1.0
OS
Windows
Additional context
No response
Use of the Previewer requires a desktop build of the app. Try also adding a reference to the Avalonia.Desktop package as part of the net8.0 build.
<PackageReference Include="Avalonia.Desktop" Version="11.3.4" />