Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to Live #29678

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion aspnetcore/blazor/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ Project structure:

* `appsettings.json` and environmental app settings files: Provide [configuration settings](xref:blazor/fundamentals/configuration) for the app.

* `Program.cs`/`Program.Server.cs`/`Program.Browser.cs`: The app's entry point that sets up the ASP.NET Core [host](xref:fundamentals/host/generic-host) and contains the app's startup logic, including service registrations and request processing pipeline configuration. If a Blazor Web App app is created only for Blazor Server hosting, a single file named `Program.cs` is created by the Blazor project template. If a Blazor Web App is created for both Blazor Server and Blazor WebAssembly hosting, two files are created. `Program.Server.cs` is for server-side execution by the server-side .NET runtime, and `Program.Browser.cs` is created for client-side execution by the client-side .NET runtime based on WebAssembly.
* `Program.cs`/`Program.Server.cs`/`Program.Browser.cs`: The app's entry point that sets up the ASP.NET Core web application or WebAssembly [host](xref:fundamentals/host/generic-host#host-definition) and contains the app's startup logic, including service registrations, configuration, logging, and request processing pipeline.

If a Blazor Web App app is only created for Blazor Server hosting, a single file named `Program.cs` is created by the Blazor project template. If a Blazor Web App is created for both Blazor Server and Blazor WebAssembly hosting, two files are created:

* `Program.Server.cs` is created for server-side execution by the server-side .NET runtime.
* `Program.Browser.cs` is created for client-side execution by the client-side .NET runtime based on WebAssembly.

A `Program` file:

* Specifies the app's [dependency injection (DI)](xref:fundamentals/dependency-injection) services. Services for Razor components are added by calling `AddRazorComponents`. For Blazor Server hosting, `AddServerComponents` adds services to support rendering interactive server components, and `AddWebAssemblyComponents` adds services to support rendering interactive WebAssembly components.
* Configures the app's request handling pipeline. For Blazor Server hosting, `MapRazorComponents` discovers available components and specifies the root component for the app, which by default is the `App` component (`App.razor`).

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/blazor/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ To create a Blazor app on macOS, use the following guidance:
> [!NOTE]
> Visual Studio for Mac will be able to create Blazor Web Apps in an upcoming release.

<!-- HOLD FOR 8.0 UPDATE TO USE VS UI
<!-- UPDATE FOR 8.0

In the sidebar, select **Web and Console** > **App**.

Expand Down Expand Up @@ -599,7 +599,7 @@ For more information on template options, see the following resources:

:::moniker range=">= aspnetcore-8.0"

<!-- HOLD FOR 8.0
<!-- UPDATE FOR 8.0

* [`blazor`](/dotnet/core/tools/dotnet-new-sdk-templates#blazor)

Expand Down
Loading
Loading