when i create new blazor webassembly project in visual studio i check the enlist in .net aspire orchestration box and it will be add to my project
but when I started my project I couldn't see any blazor project running on Aspire
I have a few project with APIs and single blazor webassembly project and I want to add Aspire to them but it doesn't run blazor webassembly part
and also I tried to add it manually so my API was added but for blazor webassembly I getting error
In the host project add a project reference to the WebAssembly application.
In the program.cs of the Host project BlazorApp38.AppHost
add.
Select the WebAssembly project.
The source generator should then kick in. Projects.BlazorApp38
should be defined.
In program.cs cs simply add
builder.AddProject<Projects.BlazorApp38>("webapp");
var builder = DistributedApplication.CreateBuilder(args);
builder.AddProject<Projects.BlazorApp38>("webapp");
builder.Build().Run();
It should look like this.
Remember this app will be running in the clients browser..
I recommend using a hosted app with something like yarp to proxy to the internal api's of the distributed app, that's the point of using a framework like Aspire right?. The client can make secure calls to its host which uses a reverse proxy to resolve the internal aspire endpoint(s).