I'm trying to create a new Blazor WebAssembly application with a backend API server. However, while creating the project in Visual Studio 2022, I can't find the checkbox for "ASP.NET Core Hosted" that was present in previous versions.
According to Microsoft's documentation, in .NET 8 and later:
How do I create this type of application structure using the new template system ?
I'm using Visual Studio 2022 and my target framework will be .NET 9.
Visual studio generate 3 projects in the orignal ASP.NET Core Hosted Blazor WebAssembly template
And the project reference between them should be like below:
If you want to keep the same project structure, you need manually create three project step by step and also need add/modify some configurations which are too complex and easily make mistake. You could refer to this github repo for how to build an ASP.NET Core hosted Blazor WebAssembly app with .NET 8.
In conclusion, I also agree with @MrC aka Shaun Curtis, suggest you create Blazor Web App
with WebAssembly Interactive render mode and Global Interactivity location.