AvaloniaUI/AvaloniaVS

preview and autocomplete only work if you have a desktop application

robertorp opened this issue · 3 comments

Describe the bug

Preview and autocomplete only work if you have a desktop application

To Reproduce

Creating a project only with Android and iOS, the preview will stop working and so will autocomplete.

Expected behavior

At least xmls tag autocomplete works

Avalonia version

11.0.2 or >

OS

Android, iOS

Additional context

repository example: https://github.com/robertorp/AvaloniaApplication9

By design. You need a desktop project.

@maxkatz6

Even if project is focused on Mobile?

Can you give more details why it is so tied up?

@marcosgerene because project is executed by the previewer with "in-app" windowing system. You can't easily run iOS or Android app on desktop embedding it inside of IDE.

Even if we hacked up Avalonia mobile backends inside of the previewer, .NET SDK will still expect these targets to run on mobile.

Another solution would be to create a fake desktop project. But it will have a high chance of breaking custom app builder configuration and cause unexpected bugs. Having Desktop project kept and maintained by the user is much more reliable.

Not to mention, even if you don't intend to release desktop version, it's always useful to have desktop project for debugging and profiling.