Skip to content

Prerendered hosted Blazor WASM errors not addressed by guidance (.NET 10) #28443

@Krangth

Description

@Krangth

The instructions regarding setting up a solution with working WebAssemblyPrerendered are too difficult to follow. I have spent several hours trying to follow along and I just cannot get it to work.

Step 4 says:
Add _Host.cshtml and _Layout.cshtml files to the Server project's Pages folder. You can obtain the files from a project created from the Blazor Server template using Visual Studio or using the .NET CLI with the dotnet new blazorserver -o BlazorServer command in a command shell (the -o BlazorServer option creates a folder for the project). After placing the files into the Server project's Pages folder, make the following changes to the files.

That template does not contain a _Layout.cshtml file.

I encountered numerous error messages and I couldn't find any information on how to resolve them. I'm going to switch to a Blazor Server solution instead.

I think that there should be two dotnet new templates for a blazor wasm hosted with prerendering enabled. One with auth and one without auth. Then I could at least do a diff on my solution versus the working solution.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions