Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avalonia single project support #9613

Merged
merged 22 commits into from
Mar 28, 2024
Merged

Avalonia single project support #9613

merged 22 commits into from
Mar 28, 2024

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Dec 4, 2022

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.

What does not work:

  • Referencing of correct platform specific nuget packages. Developers need to reference Avalonia.iOS/Browser/Android/Desktop manually.
  • Proper integration with VS (everything seems to work except VS doesn't understand how to run mobile projects). Fixed
  • 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
Copy link
Member Author

maxkatz6 commented Mar 9, 2023

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

@AvaloniaUI AvaloniaUI deleted a comment from avaloniaui-team Dec 27, 2023
@AvaloniaUI AvaloniaUI deleted a comment from avaloniaui-team Dec 27, 2023
@maxkatz6 maxkatz6 reopened this Dec 27, 2023
@maxkatz6 maxkatz6 force-pushed the singleproject-avalonia branch from a414bd6 to a6e4a47 Compare December 27, 2023 08:31
@maxkatz6
Copy link
Member Author

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

# Conflicts:
#	azure-pipelines.yml
#	build/BuildTargets.targets
#	global.json
#	samples/MobileSandbox.Android/MobileSandbox.Android.csproj
#	samples/MobileSandbox.Browser/MobileSandbox.Browser.csproj
#	samples/MobileSandbox.Desktop/MobileSandbox.Desktop.csproj
#	samples/MobileSandbox.iOS/MobileSandbox.iOS.csproj
@maxkatz6 maxkatz6 changed the title [Experiment] Avalonia single project support Avalonia single project support Mar 22, 2024
@maxkatz6 maxkatz6 marked this pull request as ready for review March 22, 2024 04:40
@avaloniaui-bot
Copy link

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
Copy link

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
Copy link

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
Copy link

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]

Copy link
Member

@kekekeks kekekeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire single project concept is cursed, but PR looks good.

@maxkatz6 maxkatz6 enabled auto-merge March 28, 2024 09:03
@avaloniaui-bot
Copy link

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]

@maxkatz6 maxkatz6 added this pull request to the merge queue Mar 28, 2024
Merged via the queue into master with commit 4b1ca38 Mar 28, 2024
11 checks passed
@maxkatz6 maxkatz6 deleted the singleproject-avalonia branch March 28, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants