blazor.net-8.0visual-studio-project

Blazor WASM in a single project?


I noticed with .NET8, whenever you create a new Blazor project, it always generates two projects instead (a "main" and a ".Client" project), no matter what combination of options you choose. Is there a way to create ONLY one project like it was in .NET6?

And also, what's the purpose of having it split into two projects?


Solution

  • Use the "Blazor WebAssembly Standalone App" template in Visual Studio to create a single project Blazor WASM app. "Blazor Web App" is the Blazor template that creates 2 projects, server and client, as you have found.