Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

[Experiment] Avalonia single project support

Open maxkatz6 opened this issue 2 years ago • 2 comments

What does the pull request do?

Makes it easier to create a single project for windows, macos, ios and android platforms. With "NET8.0" it's possible to include "net8.0-browser" as well now. But it still has problems with linux target - .NET doesn't support yet nor alias it.

What's working:

  • Platform specific folders, including bootstrap projects.
  • Rider integration (at least EAP), including project build, debug and run.
  • Referencing of correct platform specific nuget packages.

What does not work:

  • Proper integration with VS (everything seems to work except VS doesn't understand how to run mobile projects).
  • Linux targets. But it's possible to create a "Desktop" target (i.e. "net8.0" TFM)
  • Windows MSIX support (out of scope).
  • Special resource types that can be converted to the platform specific ones. For instance, icons defined once and converted to each platform automatically. Instead, developers need to convert them manually and put to the platform specific folder.

Disclaimer: Avalonia team still recommends multiple projects approach, which is available in our templates. It is more verbose, but way more flexible in a long term. Also doesn't have stoppers with linux projects.

What is the updated/expected behavior with this PR?

MAUI, Tizen and MSBuild.SDK.Extras source codes were used as a reference.

maxkatz6 avatar Dec 04 '22 03:12 maxkatz6

Potentially can be useful on mobile only. But blocked by inconsistency in the .NET SDK itself. Possibly can be reopened in the future.

maxkatz6 avatar Mar 09 '23 08:03 maxkatz6

Resurrecting this PR. I want to have this feature at least for the internal use.

maxkatz6 avatar Dec 27 '23 09:12 maxkatz6

You can test this PR using the following package version. 11.2.999-cibuild0046447-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

avaloniaui-bot avatar Mar 22 '24 05:03 avaloniaui-bot

You can test this PR using the following package version. 11.2.999-cibuild0046452-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

avaloniaui-bot avatar Mar 22 '24 08:03 avaloniaui-bot

You can test this PR using the following package version. 11.2.999-cibuild0046619-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

avaloniaui-bot avatar Mar 26 '24 04:03 avaloniaui-bot

You can test this PR using the following package version. 11.2.999-cibuild0046688-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

avaloniaui-bot avatar Mar 28 '24 08:03 avaloniaui-bot

You can test this PR using the following package version. 11.2.999-cibuild0046702-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

avaloniaui-bot avatar Mar 28 '24 09:03 avaloniaui-bot