From 15b092bf229bda4da6e17ecfb3b4d31306e992bc Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Mon, 10 Nov 2025 12:41:41 -0500 Subject: [PATCH] Blazor 10.0 updates --- aspnetcore/blazor/components/quickgrid.md | 2 +- aspnetcore/blazor/components/rendering.md | 5 +---- aspnetcore/blazor/file-uploads.md | 21 +++++-------------- aspnetcore/blazor/forms/index.md | 4 ++-- .../fundamentals/dependency-injection.md | 2 -- .../blazor/fundamentals/environments.md | 4 ---- aspnetcore/blazor/fundamentals/signalr.md | 2 +- .../host-and-deploy/configure-trimmer.md | 2 +- .../blazor/webassembly-build-tools-and-aot.md | 5 ----- 9 files changed, 11 insertions(+), 36 deletions(-) diff --git a/aspnetcore/blazor/components/quickgrid.md b/aspnetcore/blazor/components/quickgrid.md index 59b999af5aae..903a92cfa08b 100644 --- a/aspnetcore/blazor/components/quickgrid.md +++ b/aspnetcore/blazor/components/quickgrid.md @@ -127,7 +127,7 @@ Set the `QuickGrid` component's ``` - To provide a UI for pagination, add a [`Paginator` component](xref:Microsoft.AspNetCore.Components.QuickGrid.Paginator) above or below the `QuickGrid` component. Set the to `pagination`: diff --git a/aspnetcore/blazor/components/rendering.md b/aspnetcore/blazor/components/rendering.md index 0a0f331eaf71..57a738e49589 100644 --- a/aspnetcore/blazor/components/rendering.md +++ b/aspnetcore/blazor/components/rendering.md @@ -349,7 +349,4 @@ The state manager approach is similar to the earlier case with - -A loading progress indicator isn't present in an app created from the Blazor Web App project template. A new loading progress indicator feature is planned for a future release of .NET. In the meantime, an app can adopt custom code to create a loading progress indicator. For more information, see . +An app can adopt custom code to create a loading progress indicator. For more information, see . diff --git a/aspnetcore/blazor/file-uploads.md b/aspnetcore/blazor/file-uploads.md index afc764734c95..5faa61f98d4a 100644 --- a/aspnetcore/blazor/file-uploads.md +++ b/aspnetcore/blazor/file-uploads.md @@ -98,17 +98,6 @@ await blobContainerClient.UploadBlobAsync( A component that receives an image file can call the convenience method on the file to resize the image data within the browser's JavaScript runtime before the image is streamed into the app. Use cases for calling are most appropriate for Blazor WebAssembly apps. -:::moniker range="< aspnetcore-9.0" - - - -## Autofac Inversion of Control (IoC) container users - -If you're using the [Autofac Inversion of Control (IoC) container](https://autofac.org/) instead of the built-in ASP.NET Core dependency injection container, set to `true` in the [server-side circuit handler hub options](xref:blazor/fundamentals/signalr#server-side-circuit-handler-options). For more information, see [FileUpload: Did not receive any data in the allotted time (`dotnet/aspnetcore` #38842)](https://github.com/dotnet/aspnetcore/issues/38842#issuecomment-1342540950). - -:::moniker-end - ## File size read and upload limits :::moniker range=">= aspnetcore-9.0" @@ -293,7 +282,7 @@ public class UploadResult A security best practice for production apps is to avoid sending error messages to clients that might reveal sensitive information about an app, server, or network. Providing detailed error messages can aid a malicious user in devising attacks on an app, server, or network. The example code in this section only sends back an error code number (`int`) for display by the component client-side if a server-side error occurs. If a user requires assistance with a file upload, they provide the error code to support personnel for support ticket resolution without ever knowing the exact cause of the error. - @@ -302,9 +291,9 @@ The following `LazyBrowserFileStream` class defines a custom stream type that la `LazyBrowserFileStream.cs`: - + - + :::moniker range=">= aspnetcore-8.0" @@ -369,7 +358,7 @@ The following `FileUpload2` component: :::moniker-end - + :::moniker range=">= aspnetcore-8.0" @@ -1297,7 +1286,7 @@ Possible causes: * Not reading the stream to completion. This isn't a framework issue. Trap the exception and investigate it further in your local environment/network. - diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index c9e1964d6388..b1b6bce6e52d 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -448,9 +448,9 @@ jQuery validation isn't supported in Razor components. We recommend any of the f * Use native HTML validation attributes (see [Client-side form validation](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)). * Adopt a third-party validation JavaScript library. - + -For statically-rendered forms on the server, a new mechanism for client-side validation is under consideration for .NET 10 in late 2025. For more information, see [Create server rendered forms with client validation using Blazor without a circuit (`dotnet/aspnetcore` #51040)](https://github.com/dotnet/aspnetcore/issues/51040). +For statically-rendered forms on the server, a new mechanism for client-side validation is under consideration. For more information, see [Create server rendered forms with client validation using Blazor without a circuit (`dotnet/aspnetcore` #51040)](https://github.com/dotnet/aspnetcore/issues/51040). ## Additional resources diff --git a/aspnetcore/blazor/fundamentals/dependency-injection.md b/aspnetcore/blazor/fundamentals/dependency-injection.md index 02934ffdb378..53fe7304cb83 100644 --- a/aspnetcore/blazor/fundamentals/dependency-injection.md +++ b/aspnetcore/blazor/fundamentals/dependency-injection.md @@ -355,8 +355,6 @@ public IMyService MyService { get; set; } ## Utility base component classes to manage a DI scope - - In non-Blazor ASP.NET Core apps, scoped and transient services are typically scoped to the current request. After the request completes, scoped and transient services are disposed by the DI system. In interactive server-side Blazor apps, the DI scope lasts for the duration of the circuit (the SignalR connection between the client and server), which can result in scoped and disposable transient services living much longer than the lifetime of a single component. Therefore, don't directly inject a scoped service into a component if you intend the service lifetime to match the lifetime of the component. Transient services injected into a component that don't implement are garbage collected when the component is disposed. However, injected transient services *that implement * are maintained by the DI container for the lifetime of the circuit, which prevents service garbage collection when the component is disposed and results in a memory leak. An alternative approach for scoped services based on the type is described later in this section, and disposable transient services shouldn't be used at all. For more information, see [Design for solving transient disposables on Blazor Server (`dotnet/aspnetcore` #26676)](https://github.com/dotnet/aspnetcore/issues/26676). diff --git a/aspnetcore/blazor/fundamentals/environments.md b/aspnetcore/blazor/fundamentals/environments.md index c20b4c1dc590..108613998fb5 100644 --- a/aspnetcore/blazor/fundamentals/environments.md +++ b/aspnetcore/blazor/fundamentals/environments.md @@ -15,10 +15,6 @@ uid: blazor/fundamentals/environments This article explains how to configure and read the [environment](xref:fundamentals/environments) in a Blazor app. When running an app locally, the environment defaults to `Development`. When the app is published, the environment defaults to `Production`. - - We recommend the following conventions: diff --git a/aspnetcore/blazor/fundamentals/signalr.md b/aspnetcore/blazor/fundamentals/signalr.md index 03400de91b20..330bb1437ea4 100644 --- a/aspnetcore/blazor/fundamentals/signalr.md +++ b/aspnetcore/blazor/fundamentals/signalr.md @@ -316,7 +316,7 @@ app.MapBlazorHub(options => }); ``` - Configuring the hub used by with fails with an : diff --git a/aspnetcore/blazor/host-and-deploy/configure-trimmer.md b/aspnetcore/blazor/host-and-deploy/configure-trimmer.md index 4a7ece7169e5..da350e8df99e 100644 --- a/aspnetcore/blazor/host-and-deploy/configure-trimmer.md +++ b/aspnetcore/blazor/host-and-deploy/configure-trimmer.md @@ -18,7 +18,7 @@ Blazor WebAssembly performs [Intermediate Language (IL)](/dotnet/standard/glossa ## Default trimmer granularity - - * Using the .NET 9 SDK * Targeting .NET 9 requires `wasm-tools`. * Targeting .NET 8 requires `wasm-tools-net8`.