diff --git a/aspnetcore/blazor/components/integration.md b/aspnetcore/blazor/components/integration.md index 15830b17f28f..2dad9cc2c506 100644 --- a/aspnetcore/blazor/components/integration.md +++ b/aspnetcore/blazor/components/integration.md @@ -179,6 +179,12 @@ To support routable Razor components in Razor Pages apps: > [!NOTE] > The preceding example assumes that the component and Blazor script (`_framework/blazor.server.js`) are rendered by the app's layout. For more information, see the [Configuration](#configuration) section. + > + > In .NET 10 or later, the Blazor script is included by the framework if the project contains at least one Razor component file (`.razor`). If your app requires the Blazor script but doesn't contain at least one component, add the following MSBuild property to the app's project file to force unconditional script inclusion: + > + > ```xml + > true + > ``` configures whether the `App` component: @@ -260,6 +266,12 @@ To support routable Razor components in MVC apps: > [!NOTE] > The preceding example assumes that the component and Blazor script (`_framework/blazor.server.js`) are rendered by the app's layout. For more information, see the [Configuration](#configuration) section. + > + > In .NET 10 or later, the Blazor script is included by the framework if the project contains at least one Razor component file (`.razor`). If your app requires the Blazor script but doesn't contain at least one component, add the following MSBuild property to the app's project file to force unconditional script inclusion: + > + > ```xml + > true + > ``` configures whether the `App` component: diff --git a/aspnetcore/blazor/project-structure.md b/aspnetcore/blazor/project-structure.md index 41502429aa01..67524e3d2d5b 100644 --- a/aspnetcore/blazor/project-structure.md +++ b/aspnetcore/blazor/project-structure.md @@ -70,11 +70,11 @@ The `Components/Pages` folder of the server project contains the app's routable Add the angle brackets around the cross-link when activating. -:::moniker range=">= aspnetcore-10.0" +moniker range=">= aspnetcore-10.0" The `NotFound` component (`NotFound.razor`) implements a Not Found page to display when content isn't found for a request path. For more information, see xref:blazor/fundamentals/navigation#not-found-responses. -:::moniker-end +moniker-end --> @@ -332,9 +332,9 @@ Project structure: Add the angle brackets around the cross-link when activating. -:::moniker-end +moniker-end -:::moniker range=">= aspnetcore-10.0" +moniker range=">= aspnetcore-10.0" * `Pages` folder: Contains the Blazor app's routable Razor components (`.razor`). The route for each page is specified using the [`@page`](xref:mvc/views/razor#page) directive. The template includes the following components: * `Counter` component (`Counter.razor`): Implements the Counter page. @@ -342,9 +342,9 @@ Project structure: * `Weather` component (`Weather.razor`): Implements the Weather page. * `NotFound` component (`NotFound.razor`) Implements a Not Found page to display when content isn't found for a request path. For more information, see xref:blazor/fundamentals/navigation#not-found-responses. -:::moniker-end +moniker-end -:::moniker range=">= aspnetcore-8.0 < aspnetcore-10.0" +moniker range=">= aspnetcore-8.0 < aspnetcore-10.0" --> @@ -357,9 +357,9 @@ Project structure: https://github.com/dotnet/AspNetCore.Docs/pull/36145 is merged. -:::moniker-end +moniker-end -:::moniker range=">= aspnetcore-8.0" +moniker range=">= aspnetcore-8.0" --> diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md index 65a17c54b44a..1ef80c1dd8b9 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md @@ -36,6 +36,12 @@ For more information, see true +``` + For more information, see the following resources: *