Search code examples
c#.netweb-applicationsblazor

How to create a standalone web application with Blazor?


I am new to Web development and Blazor. I would like to create a standalone web application using Blazor where the user would click on deployed files on local network and have the application start inside their web browser much like having a exe standalone for desktop applications. I have searched Windows documentation on Blazor but cant seem to find the answer. Thanks in advance


Solution

  • Try building a blazor pwa application, this can be installed on desktop and it work like desktop application on windows or Mac OS. Here is the MS doc to create a sample pwa application.link to docs

    Installation and app manifest

    When visiting an app created using the PWA template, users have the option of installing the app into their OS's start menu, dock, or home screen. The way this option is presented depends on the user's browser. When using desktop Chromium-based browsers, such as Edge or Chrome, an Add button appears within the URL bar. After the user selects the Add button, they receive a confirmation dialog:

    image

    On iOS, visitors can install the PWA using Safari's Share button and its Add to Homescreen option. On Chrome for Android, users should select the Menu button in the upper-right corner, followed by Add to Home screen.

    Once installed, the app appears in its own window without an address bar:

    image