Weird WebAssembly error - regarding 'ManagedToNativeGenerator' #19425
-
I have a new WebAssembly test project which I've added to a copy of an existing working Avalonia UI solution (desktop up to this point).
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Found the problem: the UI project referenced by the WebAssembly has a reference to 'Avalonia.Desktop'. If I had followed the existing documentation more carefully I would have seen this earlier, but impatience got the better of me. |
Beta Was this translation helpful? Give feedback.
Found the problem: the UI project referenced by the WebAssembly has a reference to 'Avalonia.Desktop'.
The solution is to move nearly all the existing desktop UI code to a new library project shared by both the desktop project and the WebAssembly project. The shared UI project will not have the Avalonia.Desktop reference.
If I had followed the existing documentation more carefully I would have seen this earlier, but impatience got the better of me.