Avalonia
Avalonia copied to clipboard
[Experiment] Avalonia single project support
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.
Potentially can be useful on mobile only. But blocked by inconsistency in the .NET SDK itself. Possibly can be reopened in the future.
Resurrecting this PR. I want to have this feature at least for the internal use.
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]
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]
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]
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]
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]