Skip to content

This provides sample code that shows various types of Blazor hosting models - Server, WASM (hosted/standalone) and Hybrid (MAUI and WinForm). They all share the same components with minimal code changes.

License

Notifications You must be signed in to change notification settings

devkimchi/blazor-hosting-model-sample

Repository files navigation

Blazor Hosting Model Sample

This provides sample code that shows various types of Blazor hosting models - Server, WASM (hosted/standalone) and Hybrid (MAUI/WinForm/WPF). They all share the same components with minimal code changes.

Prerequisites

Due to the nature of the sample applications, it only targets Windows OS.

Getting Started

  1. Fork this repository.

  2. Clone the forked repository to your local machine.

  3. Open the solution, BlazorHostingModels.sln, with Visual Studio.

  4. Build the entire solution.

    There might be a chance that solution build fails. Then, clean the solution first and rebuild the solution.

  5. Run the backend API in a separate terminal or console like Visual Studio Code, Windows Terminal or PowerShell.

    cd src/BackendApi
    func start
  6. Run each project individually to see how it works.

    For the hosted Blazor WASM app, run the following SWA CLI command within Visual Studio Code, Windows Terminal or PowerShell:

    swa start

Something More?

About

This provides sample code that shows various types of Blazor hosting models - Server, WASM (hosted/standalone) and Hybrid (MAUI and WinForm). They all share the same components with minimal code changes.

Resources

License

Stars

Watchers

Forks