MAUI = blazor wasm / server

Dhiogo Acioli 0 Reputation points
2024-11-24T07:08:47.3233333+00:00

I was creating a new project. Even though I chose the Blazor WebAssembly version, it seems that the DLLs used are from Blazor Server, which prevents me from publishing to the static web app (which are exclusive to static sites).

Does MAUI really only work with Blazor Server?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,722 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 68,306 Reputation points
    2024-11-24T18:24:31.69+00:00

    Blazor has multiple templates. You are using the Blazor WebApp template that supports both server and WASM and pre-render for both. Even in WASM mode, the server code does a prerender.

    if you want to create a WASM for static hosting, you are using the wrong template. You want the blazor webassembly standalone template. Or just

    % dotnet new blazorwasm


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.