These changes allow Aspire service discovery to work in a hosted Blaz… #7162
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.
These changes allow Aspire service discovery to work with a hosted Blazor WebAssembly app.
It basically integrates my Nuget package Aspire4Wasm (source code here) into Aspire (with the addition of only 5 new classes and 2 interfaces, and changing none of the existing ones).
The changes allow an Aspire
AppHost
to define web APIs that a Blazor app can access, and pass that service discovery information to the app by writing to itsappsettings.{environment}.json
files.These changes will not make the Aspire developer experience with Blazor totally seamless. For example, I'm still having difficulty with stand-alone Blazor WebAssembly apps, and I haven't figured out how to stop the app launching on a random port as well as the one specified in
launchsettings.json
. However, this is a step in the right direction and will help make Aspire a bit more Blazor-friendly. If you want to see what it does before accepting the changes, try the Nuget package Aspire4Wasm (version 3.0.0 at the time of writing).Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):