I created the sample Blazor application in Visual Studio 2019.
I ran the application and it worked well.
I changed index.razor page as follows: