C
C#2y ago
teauxfu

❔ ✅ How does .NET MAUI Blazor relate to Blazor Server or WebAssembly?

Or am I conflating those ideas? I see the .NET MAUI Blazor project template index.html has the line <script src="_framework/blazor.webview.js" autostart="false"></script>. So that tells me it isn't using WebAssembly, right? I want to write a Blazor app with the intention of using it as a desktop application. I think either PWA via WebAssembly or Blazor inside MAUI as a desktop exe would work. I'm curious if there's some solution layout which would allow building both. The app wouldn't be useful on phones or tablets, so I'm not concerned about those targets. I'm just interested in .NET + xplat desktop UI, without resorting to Electron. I saw this reddit post in which a comment suggests using a shared project structure where you keep the Blazor project separate, and just reference it from the MAUI "host" if you will. https://www.reddit.com/r/dotnet/comments/pqi891/net_maui_app_vs_net_maui_blazor_app/ I'm interested in pursuing this route, but not sure whether I should have the dedicated Blazor project be a WebAssembly or Server. Or if it even matters at this point and I might as well use a Razor Class Library template.
reddit
r/dotnet - ".NET MAUI App" vs ".NET MAUI Blazor App"?
22 votes and 15 comments so far on Reddit
5 Replies
Angius
Angius2y ago
MAUI Blazor is just Blazor WASM wrapped up in a WebView running on MAUI
teauxfu
teauxfuOP2y ago
Okay, thank you that is what I was confused about
Angius
Angius2y ago
If you want .NET and xplat desktop, consider Avalonia
teauxfu
teauxfuOP2y ago
okay I will, thanks yeah this seems cool. it is specifically xplat desktop. i'm not sure if i want to fight xaml or razor yet at this point. I'm going to do some more thinking about what this hypothetical app needs to do, consider if web ui will become more desirable later than I consider it now, etc. I don't think I'd hit any WebAssembly specific issues, but I need to look more into the limitations of .NET on that "target" thanks for the response
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server