AvaloniaUI / AvaloniaVS

Visual Studio Extension for Avalonia
MIT License
424 stars 82 forks source link

preview and autocomplete only work if you have a desktop application #455

Open robertorp opened 6 months ago

robertorp commented 6 months ago

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

maxkatz6 commented 6 months ago

By design. You need a desktop project.

marcosgerene commented 6 months ago

@maxkatz6

Even if project is focused on Mobile?

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

maxkatz6 commented 6 months ago

@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.