Repository navigation
feat: add an Aspire option to the unoapp template - #2449
Draft
Kunal22shah wants to merge 6 commits into
Draft
Kunal22shah wants to merge 6 commits into
Kunal22shah wants to merge 6 commits into
Conversation
2 of 5 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue (If applicable): related to unoplatform/uno#26714, unoplatform/uno.extensions#3309, unoplatform/uno.extensions#3310, unoplatform/uno.extensions#3311
PR Type
What is the current behavior?
There is no template option for Aspire. To run an Uno app under Aspire, users create the AppHost, the Server's service defaults and the app's settings by hand.
What is the new behavior?
A new Aspire option (
-aspire, and a card in the wizard after Server). It adds an Aspire AppHost that starts the app's desktop and WebAssembly heads, and the Server when there is one, with the dashboard for their logs, traces and metrics:AspireinUnoFeaturesand.UseServiceDefaults(). With the Server, the API client callshttps+http://api. A head started outside the AppHost (Android, iOS, Windows, or desktop from the IDE) falls back to the Server's local address as before.AddServiceDefaults()andMapDefaultEndpoints(). With Serilog, logs are forwarded so they reach the dashboard. CORS only allows the WebAssembly origin the AppHost passes.-aspireturns it on unless-di false) and the desktop or WebAssembly platform. It works without the Server.Uno.Extensions.Aspire.Hostingon the Uno.Extensions version the Uno.Sdk ships, written by the updater.Important
Draft until the dependencies ship: the
AspireUnoFeature in the Uno.Sdk (unoplatform/uno#26714), andUno.Extensions.Aspire/Uno.Extensions.Aspire.Hosting(the PRs above). The two new CI scenarios,AspireServerandAspireBlank, fail until then.Reviewer's guide
MyExtensionsApp.1.AppHost/AppHost.csand theaspiresymbols intemplate.json.ServiceDefaults/Extensions.csis Aspire 17'saspire-servicedefaultstemplate, unchanged..slnchanges are mechanical: two projects, their configurations, and nesting underSource.docs: add the Aspire AppHost specis docs only.Verification
Generated from this branch (isolated template hive), with local builds of the unreleased packages:
recommended -server -aspire,-aspire(blank),-aspire -di false, and-aspire -platforms android ios: the AppHost appears only in the first two.build/Test-WizardOptions.ps1andbuild/Test-WizardIcons.ps1pass, and the card renders in the wizard.Not run: the iOS and Windows heads.
PR Checklist
Please check if your PR fulfills the following requirements:
🤖 Generated with Claude Code