Update Project Structure article (#29670)

pull/29671/head
Luke Latham 2023-06-29 10:51:46 -04:00 committed by GitHub
parent 19700898ae
commit 8eb7af2c0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -45,9 +45,9 @@ Project structure:
* `appsettings.json` and environmental app settings files: Provide [configuration settings](xref:blazor/fundamentals/configuration) for the app.
* `Program.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:
* Specifies the app's [dependency injection (DI)](xref:fundamentals/dependency-injection) services. Services for Razor components are added by calling `AddRazorComponents`. `AddServerComponents` adds services to support rendering interactive server components.
* Configures the app's request handling pipeline: `MapRazorComponents` discovers the available components and specifies the root component for the app, which by default is the `App` component (`App.razor`).
* `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.
* 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`).
Additional files and folders may appear in an app produced from a Blazor Web App project template when additional options are configured. For example, generating an app with ASP.NET Core Identity includes additional assets for authentication and authorization features.