VS2019 : blazor client and Blazor server when ASP.net core hosted option is checked

Raghuwanshi, Shatrughan 1 Reputation point
2021-02-28T12:30:43.553+00:00

I am trying to build a PWA using Blazor ,

i read i need to select Blazor Assembly/ Enable PWA application

it also have ASP.net core hosted option as well when i select this it creates 2 project server/client

I am very confused what to write on server and what to write on client project

My aim is to create a PWA and communicate my forms via Rest API

Does disabling ASP.Net core hostes option also allow me to create similar architecture?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,408 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Wang-MSFT 1,051 Reputation points
    2021-03-01T07:17:29.497+00:00

    Hi, @RaghuwanshiShatrughan-2703,

    Select the “ASP.NET Core Hosted” option for two reasons.
    First, need to integrate some backend services in the future.
    Second, using an ASP.NET Core Hosted site makes it easier to run a published version of the app in your local developer environment.

    If you have backend server, there is no need to select ASP.NET Core hosted option.

    Link: Build Progressive Web Applications with ASP.NET Core Blazor WebAssembly

    ---
    If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,
    Michael Wang