Best framework to build Mobile & Web applications

john john Pter 1,590 Reputation points
2026-09-19T21:32:34.9566667+00:00

I have good experience and skills in building web application using .net core MVC framework, entity framework and SQL server. but i want to extend my knowledge to build mobile applications. so is there a .net framework that allow me to build a single project that can work as mobile application and web application at the same time, or reuse shared code? i read about MAUI BLAZOR Hybrid, but still unsure if this framework will allow me to build one project or atleast reuse code among the mobile app and web app?

Thanks

Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

Answer accepted by question author
Rukshan edirisinghe 1,155 Reputation points
2026-09-20T13:14:38.29+00:00

Hi @john john Pter

Yes, and you're closer than you think. What you want exists as an official template called the .NET MAUI Blazor Hybrid and Web App solution template. It sets up a solution targeting Android, iOS, Mac, Windows and Web, with a Blazor Web App, a MAUI Blazor Hybrid app, and a shared Razor class library (RCL) holding all the UI components.

So to answer your exact question: it's not literally one project, it's one solution with three projects, but you write your pages once in the shared library and both the mobile app and the website render the same UI. That's the maximum reuse .NET offers today, and it's the officially recommended pattern. For the bits that must differ per platform (file access, camera, etc.), the template includes sample code showing how to use dependency injection to swap implementations between the Hybrid and Web apps.

To try it: install the MAUI workload and run dotnet new maui-blazor-web, or pick the template in Visual Studio.

Your background fits this well. Blazor uses Razor and C#, so coming from MVC it'll feel familiar fast. One architecture tip: keep EF Core and SQL Server behind an ASP.NET Core Web API. The web app and the mobile app both call that API, since a mobile app should never talk to SQL Server directly.

References: https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/tutorials/maui-blazor-web-app https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/class-libraries-best-practices

Was this answer helpful?

2 people found this answer helpful.

2 additional answers

Sort by: Newest
  1. Nguyen Dam (WICLOUD CORPORATION) 595 Reputation points Microsoft External Staff Moderator
    2026-09-21T04:05:09.94+00:00

    Thank you @john john Pter for your question. Yes, MAUI Blazor is the go-to .NET framework template here if you want to build a mobile app and web app at once, from just one single solution with shared code.

    A good way to see it is perhaps to take a cursory look at the structure created by the .NET MAUI Blazor Hybrid and Web App template:

    MauiBlazorWeb/
    ├── MauiBlazorWeb/ # .NET MAUI Blazor Hybrid app - where the bootstrapping and mobile app code are
    ├── MauiBlazorWeb.Web/ # Blazor Web App - where the web app code is
    └── MauiBlazorWeb.Shared/ # Shared Razor Class Library - shared UI and code for both
    
    

    "How does .NET MAUI Blazor support both web and mobile?", you may ask. The answer is that a MAUI Blazor solution separates the shared app from the environments that host it. Which is to simply say, in this particular example:

    • MauiBlazorWeb.Shared contains the shared UI and code
    • MauiBlazorWeb.Web hosts it through the web environment
    • MauiBlazorWeb hosts it inside the native .NET MAUI app, which can then be built for Android and other supported platforms.

    That's how you don't need to implement the same application UI and shared logic twice. The shared UI and code can live in the Razor Class Library, while each host contains its environment-specific code.

    Given your experience with other .NET technologies, you should be in good hands here. .NET MAUI Blazor stays within the familiar .NET ecosystem, so much of your existing C# and .NET development knowledge carries over naturally. For example, you can have ASP.NET Core/EF Core backend, while the .NET MAUI Blazor Hybrid app communicates with your server through APIs as the native client.

    For introductory reading, I recommend starting with these Microsoft Learn resources:

    If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation. Thank you.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Bruce (SqlWork.com) 85,456 Reputation points
    2026-09-20T16:12:09.58+00:00

    There are two dotnet options for mobile development.

    The first is Blazor hybrid. This runs your Blazor code in a hosted web view in the mobile app. You can share Blazor views between web and mobile. While Blazor views use razor syntax, it view are not compatible with MVC or razor page views. As your UI is hosted by a webview, your apps UI is web based.

    The second is Maui with xmal. The form is created with xmal and is cross platform. The generated controls from the xmal are actual platform controls so you get a native look. As the xmal is cross platform, it’s control are the common subsite of iOS and Android controls.

    With either approach you can share common libraries between a .net web app and a mobile app. iOS development will require a Mac in either case. Unlike .net webapps which has LTS versions with 3 years of support, Maui only has one year and a half of support.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

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