I'm using ASP.NET Core 6. I'm trying to add a blazor project to an existing monorepo that includes a web API server project. I ran dotnet new blazorwasm --hosted
, and the generated server project includes this package:
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.4" />
What is its purpose - do I need it? The docs say:
Provides types for hosting the Blazor development server locally. Intended for framework use only, not supported for use in application code.
That's confusing - why is it included in the template? And it's not hidden behind a Development
environment build step.
Also, how does it differ to the Microsoft.AspNetCore.Components.WebAssembly.DevServer
package?
(The generated client blazor project also references Microsoft.AspNetCore.Components.WebAssembly
and Microsoft.AspNetCore.Components.WebAssembly.DevServer
. I'm curious how all these are related.)