Skip to content

Commit 7c5d404

Browse files
authored
Merge pull request #35826 from dotnet/main
2 parents 71ff565 + 13c3d66 commit 7c5d404

File tree

213 files changed

+943
-979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+943
-979
lines changed

.github/ISSUE_TEMPLATE/doc-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Check the .NET target framework(s) being used, and include the version number(s)
3636
* [ ] .NET Framework
3737
* [ ] .NET Standard
3838

39-
If using the .NET Core SDK, include `dotnet --info` output. If using .NET Framework without the .NET Core SDK, include info from Visual Studio's **Help** > **About Microsoft Visual Studio** dialog.
39+
If using the .NET SDK, include `dotnet --info` output. If using .NET Framework without the .NET SDK, include info from Visual Studio's **Help** > **About Microsoft Visual Studio** dialog.
4040

4141
<details>
4242
<summary><strong>dotnet --info output</strong> or <strong>About VS info</strong></summary>

.openpublishing.redirection.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@
762762
},
763763
{
764764
"source_path": "aspnetcore/choose-aspnet-framework.md",
765-
"redirect_url": "/aspnet/core/fundamentals/choose-aspnet-framework",
765+
"redirect_url": "/aspnet/core/overview",
766766
"redirect_document_id": false
767767
},
768768
{
@@ -1572,6 +1572,16 @@
15721572
"source_path": "aspnetcore/getting-started/index.md",
15731573
"redirect_url": "/aspnet/core/get-started",
15741574
"redirect_document_id": false
1575+
},
1576+
{
1577+
"source_path": "aspnetcore/fundamentals/choose-aspnet-framework.md",
1578+
"redirect_url": "/aspnet/core/overview",
1579+
"redirect_document_id": false
1580+
},
1581+
{
1582+
"source_path": "aspnetcore/introduction-to-aspnet-core.md",
1583+
"redirect_url": "/aspnet/core/overview",
1584+
"redirect_document_id": false
15751585
}
15761586
]
15771587
}

aspnetcore/blazor/call-web-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to call a web API from Blazor apps.
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 06/11/2025
8+
ms.date: 07/29/2025
99
uid: blazor/call-web-api
1010
---
1111
# Call a web API from ASP.NET Core Blazor
@@ -61,7 +61,7 @@ In the app's `Program` file, call:
6161

6262
* <xref:Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilder.EnableTokenAcquisitionToCallDownstreamApi%2A>: Enables token acquisition to call web APIs.
6363
* `AddDownstreamApi`: Microsoft Identity Web packages provide API to create a named downstream web service for making web API calls. <xref:Microsoft.Identity.Abstractions.IDownstreamApi> is injected into a server-side class, which is used to call <xref:Microsoft.Identity.Abstractions.IDownstreamApi.CallApiForUserAsync%2A> to obtain weather data from an external web API (`MinimalApiJwt` project).
64-
* <xref:Microsoft.Identity.Web.TokenCacheProviders.Distributed.DistributedTokenCacheAdapterExtension.AddDistributedTokenCaches%2A>: Adds the .NET Core distributed token caches to the service collection.
64+
* <xref:Microsoft.Identity.Web.TokenCacheProviders.Distributed.DistributedTokenCacheAdapterExtension.AddDistributedTokenCaches%2A>: Adds the .NET distributed token caches to the service collection.
6565
* <xref:Microsoft.Extensions.DependencyInjection.MemoryCacheServiceCollectionExtensions.AddDistributedMemoryCache%2A>: Adds a default implementation of <xref:Microsoft.Extensions.Caching.Distributed.IDistributedCache> that stores cache items in memory.
6666
* Configure the distributed token cache options (<xref:Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapterOptions>):
6767
* In development for debugging purposes, you can disable the L1 cache by setting <xref:Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapterOptions.DisableL1Cache%2A> to `true`. ***Be sure to reset it back to `false` for production.***

aspnetcore/blazor/host-and-deploy/configure-linker.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ description: Learn how to control the Intermediate Language (IL) Linker when bui
55
monikerRange: '= aspnetcore-3.1'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 11/12/2024
8+
ms.date: 07/29/2025
99
uid: blazor/host-and-deploy/configure-linker
1010
---
1111
# Configure the Linker for ASP.NET Core Blazor
1212

13-
This article explains how to control the Intermediate Language (IL) Linker when building a Blazor app.
13+
This article explains how to control the Intermediate Language (IL) Linker for client-side scenarios when building a Blazor app.
1414

1515
Blazor WebAssembly performs [Intermediate Language (IL)](/dotnet/standard/glossary#il) linking during a build to trim unnecessary IL from the app's output assemblies. The linker is disabled when building in Debug configuration. Apps must build in Release configuration to enable the linker. We recommend building in Release when deploying your Blazor WebAssembly apps.
1616

@@ -25,7 +25,7 @@ Linking for Blazor apps can be configured using these MSBuild features:
2525

2626
## Control linking with an MSBuild property
2727

28-
Linking is enabled when an app is built in `Release` configuration. To change this, configure the `BlazorWebAssemblyEnableLinking` MSBuild property in the project file:
28+
By default, linking is enabled when an app is built in `Release` configuration. To disable linking, configure the `BlazorWebAssemblyEnableLinking` MSBuild property in the project file:
2929

3030
```xml
3131
<PropertyGroup>
@@ -119,4 +119,6 @@ For more information, see [I18N: Pnetlib Internationalization Framework Library
119119

120120
## Additional resources
121121

122-
<xref:blazor/performance/app-download-size#intermediate-language-il-linking>
122+
* <xref:blazor/performance/app-download-size#intermediate-language-il-linking>
123+
* [IL trimmer concepts and related tools (`dotnet/runtime` GitHub repository)](https://github.com/dotnet/runtime/tree/main/docs/tools/illink)
124+
* [Trim self-contained deployments and executables (server-side Blazor apps only](/dotnet/core/deploying/trimming/trim-self-contained)

aspnetcore/blazor/host-and-deploy/webassembly/github-pages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The GitHub-hosted Ubuntu (latest) server has a version of the .NET SDK pre-insta
6363
1. Go to the [**Available Images** section of the `actions/runner-images` GitHub repository](https://github.com/actions/runner-images?tab=readme-ov-file#available-images).
6464
1. Locate the `ubuntu-latest` image, which is the first table row.
6565
1. Select the link in the `Included Software` column.
66-
1. Scroll down to the *.NET Tools* section to see the .NET Core SDK installed with the image.
66+
1. Scroll down to the *.NET Tools* section to see the .NET SDK installed with the image.
6767

6868
## Deployment notes
6969

aspnetcore/blazor/hosting-models.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ On the client, the Blazor script establishes the SignalR connection with the ser
6565
The Blazor Server hosting model offers several benefits:
6666

6767
* Download size is significantly smaller than when the Blazor WebAssembly hosting model is used, and the app loads much faster.
68-
* The app takes full advantage of server capabilities, including the use of .NET Core APIs.
69-
* .NET Core on the server is used to run the app, so existing .NET tooling, such as debugging, works as expected.
68+
* The app takes full advantage of server capabilities, including the use of .NET APIs.
69+
* .NET on the server is used to run the app, so existing .NET tooling, such as debugging, works as expected.
7070
* Thin clients are supported. For example, Blazor Server works with browsers that don't support WebAssembly and on resource-constrained devices.
7171
* The app's .NET/C# code base, including the app's component code, isn't served to clients.
7272

@@ -148,7 +148,7 @@ WebAssembly-rendered Razor components can use [native dependencies](xref:blazor/
148148

149149
:::moniker range="< aspnetcore-6.0"
150150

151-
Blazor WebAssembly includes support for trimming unused code from .NET Core framework libraries. For more information, see <xref:blazor/globalization-localization>.
151+
Blazor WebAssembly includes support for trimming unused code from .NET libraries. For more information, see <xref:blazor/globalization-localization>.
152152

153153
:::moniker-end
154154

aspnetcore/blazor/hybrid/security/maui-blazor-web-identity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to build a .NET MAUI Blazor Hybrid app with a Blazor Web
55
monikerRange: '>= aspnetcore-9.0'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 03/12/2025
8+
ms.date: 07/29/2025
99
uid: blazor/hybrid/security/maui-blazor-web-identity
1010
---
1111
# .NET MAUI Blazor Hybrid and Web App with ASP.NET Core Identity
@@ -41,7 +41,7 @@ The sample app is a starter solution that contains a native, cross-platform MAUI
4141
1. Open the solution in Visual Studio (2022 or later) or VS Code with the .NET MAUI extension installed.
4242
1. Set the `MauiBlazorWeb` MAUI project as the startup project. In Visual Studio, right-click the project and select **Set as Startup Project**.
4343
1. Start the `MauiBlazorWeb.Web` project without debugging. In Visual Studio, right-click on the project and select **Debug** > **Start without Debugging**.
44-
1. Inspect the Identity endpoints by navigating to `https://localhost:7157/swagger` in a browser.
44+
1. Inspect the Identity endpoints via [OpenAPI documentation](xref:fundamentals/openapi/overview). You can add a third-party OpenAPI-compliant visual UI/endpoint tester.
4545
1. Navigate to `https://localhost:7157/account/register` to register a user in the Blazor Web App. Immediately after the user is registered, use the **Click here to confirm your account** link in the UI to confirm the user's email address because a real email sender isn't registered for account confirmation.
4646
1. Start (`F5`) the `MauiBlazorWeb` MAUI project. You can set the debug target to either **Windows** or an Android emulator.
4747
1. Notice you can only see the `Home` and `Login` pages.

aspnetcore/blazor/security/blazor-web-app-with-entra.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to secure a Blazor Web App with Microsoft Entra ID.
55
monikerRange: '>= aspnetcore-9.0'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 06/11/2025
8+
ms.date: 07/29/2025
99
uid: blazor/security/blazor-web-app-entra
1010
zone_pivot_groups: blazor-web-app-entra-specification
1111
---
@@ -14,7 +14,6 @@ zone_pivot_groups: blazor-web-app-entra-specification
1414
<!-- UPDATE 10.0 Activate after release and INCLUDE is updated
1515
1616
[!INCLUDE[](~/includes/not-latest-version.md)]
17-
1817
-->
1918

2019
This article describes how to secure a Blazor Web App with [Microsoft identity platform](/entra/identity-platform/) with [Microsoft Identity Web packages](/entra/msal/dotnet/microsoft-identity-web/) for [Microsoft Entra ID](https://www.microsoft.com/security/business/microsoft-entra) using a sample app.
@@ -77,7 +76,7 @@ The `MinimalApiJwt` project is a backend web API for multiple frontend projects.
7776

7877
The `MinimalApiJwt.http` file can be used for testing the weather data request. Note that the `MinimalApiJwt` project must be running to test the endpoint, and the endpoint is hardcoded into the file. For more information, see <xref:test/http-files>.
7978

80-
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview) and the [Swagger UI](https://swagger.io/api-hub/) in the Development environment. For more information, see <xref:fundamentals/openapi/using-openapi-documents#use-swagger-ui-for-local-ad-hoc-testing>.
79+
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview).
8180

8281
A secure weather forecast data endpoint is in the project's `Program` file:
8382

@@ -289,7 +288,7 @@ The `MinimalApiJwt` project is a backend web API for multiple frontend projects.
289288

290289
The `MinimalApiJwt.http` file can be used for testing the weather data request. Note that the `MinimalApiJwt` project must be running to test the endpoint, and the endpoint is hardcoded into the file. For more information, see <xref:test/http-files>.
291290

292-
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview) and the [Swagger UI](https://swagger.io/api-hub/) in the Development environment. For more information, see <xref:fundamentals/openapi/using-openapi-documents#use-swagger-ui-for-local-ad-hoc-testing>.
291+
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview).
293292

294293
A secure weather forecast data endpoint is in the project's `Program` file:
295294

@@ -561,14 +560,10 @@ msIdentityOptions.ClientSecret = AzureHelper.GetKeyVaultSecret("{VAULT URI}",
561560

562561
Configuration is used to facilitate supplying dedicated key vaults and secret names based on the app's environmental configuration files. For example, you can supply different configuration values for `appsettings.Development.json` in development, `appsettings.Staging.json` when staging, and `appsettings.Production.json` for the production deployment. For more information, see <xref:blazor/fundamentals/configuration>.
563562

564-
:::moniker range=">= aspnetcore-9.0"
565-
566563
## Only serialize the name and role claims
567564

568565
In the `Program` file, all claims are serialized by setting <xref:Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions.SerializeAllClaims%2A> to `true`. If you only want the name and role claims serialized for CSR, remove the option or set it to `false`.
569566

570-
:::moniker-end
571-
572567
## Supply configuration with the JSON configuration provider (app settings)
573568

574569
The [sample solution projects](#sample-solution) configure Microsoft Identity Web and JWT bearer authentication in their `Program` files in order to make configuration settings discoverable using C# autocompletion. Professional apps usually use a *configuration provider* to configure OIDC options, such as the default [JSON configuration provider](xref:fundamentals/configuration/index). The JSON configuration provider loads configuration from app settings files `appsettings.json`/`appsettings.{ENVIRONMENT}.json`, where the `{ENVIRONMENT}` placeholder is the app's [runtime environment](xref:fundamentals/environments). Follow the guidance in this section to use app settings files for configuration.

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to secure a Blazor Web App with OpenID Connect (OIDC).
55
monikerRange: '>= aspnetcore-8.0'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 04/29/2025
8+
ms.date: 07/29/2025
99
uid: blazor/security/blazor-web-app-oidc
1010
zone_pivot_groups: blazor-web-app-oidc-specification
1111
---
@@ -57,7 +57,7 @@ Sample solution features:
5757

5858
* The app securely calls a web API for weather data:
5959

60-
* When rendering the `Weather` component on the server, the component uses the `ServerWeatherForecaster` on the server to obtain weather data from the web API in the `MinimalApiJwt` project using a <xref:System.Net.Http.DelegatingHandler> (`TokenHandler`) that attaches the access token from the <xref:Microsoft.AspNetCore.Http.HttpContext> to the request.
60+
* When rendering the `Weather` component on the server, the component uses the `ServerWeatherForecaster` on the server to obtain weather data from the web API in the `MinimalApiJwt` project using a <xref:System.Net.Http.DelegatingHandler> (`TokenHandler`) that attaches the access token from the <xref:Microsoft.AspNetCore.Http.HttpContext> to the request.
6161
* When the component is rendered on the client, the component uses the `ClientWeatherForecaster` service implementation, which uses a preconfigured <xref:System.Net.Http.HttpClient> (in the client project's `Program` file) to make the web API call from the server project's `ServerWeatherForecaster`.
6262

6363
:::moniker range=">= aspnetcore-9.0"
@@ -116,8 +116,18 @@ The `MinimalApiJwt` project is a backend web API for multiple frontend projects.
116116

117117
The `MinimalApiJwt.http` file can be used for testing the weather data request. Note that the `MinimalApiJwt` project must be running to test the endpoint, and the endpoint is hardcoded into the file. For more information, see <xref:test/http-files>.
118118

119+
:::moniker range=">= aspnetcore-9.0"
120+
121+
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview).
122+
123+
:::moniker-end
124+
125+
:::moniker range="< aspnetcore-9.0"
126+
119127
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview) and the [Swagger UI](https://swagger.io/api-hub/) in the Development environment. For more information, see <xref:fundamentals/openapi/using-openapi-documents#use-swagger-ui-for-local-ad-hoc-testing>.
120128

129+
:::moniker-end
130+
121131
The project creates a [Minimal API](xref:fundamentals/minimal-apis) endpoint for weather data:
122132

123133
```csharp
@@ -453,8 +463,18 @@ The `MinimalApiJwt` project is a backend web API for multiple frontend projects.
453463

454464
The `MinimalApiJwt.http` file can be used for testing the weather data request. Note that the `MinimalApiJwt` project must be running to test the endpoint, and the endpoint is hardcoded into the file. For more information, see <xref:test/http-files>.
455465

466+
:::moniker range=">= aspnetcore-9.0"
467+
468+
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview).
469+
470+
:::moniker-end
471+
472+
:::moniker range="< aspnetcore-9.0"
473+
456474
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview) and the [Swagger UI](https://swagger.io/api-hub/) in the Development environment. For more information, see <xref:fundamentals/openapi/using-openapi-documents#use-swagger-ui-for-local-ad-hoc-testing>.
457475

476+
:::moniker-end
477+
458478
The project creates a [Minimal API](xref:fundamentals/minimal-apis) endpoint for weather data:
459479

460480
```csharp
@@ -848,8 +868,18 @@ The `MinimalApiJwt` project is a backend web API for multiple frontend projects.
848868

849869
The `MinimalApiJwt.http` file can be used for testing the weather data request. Note that the `MinimalApiJwt` project must be running to test the endpoint, and the endpoint is hardcoded into the file. For more information, see <xref:test/http-files>.
850870

871+
:::moniker range=">= aspnetcore-9.0"
872+
873+
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview).
874+
875+
:::moniker-end
876+
877+
:::moniker range="< aspnetcore-9.0"
878+
851879
The project includes packages and configuration to produce [OpenAPI documents](xref:fundamentals/openapi/overview) and the [Swagger UI](https://swagger.io/api-hub/) in the Development environment. For more information, see <xref:fundamentals/openapi/using-openapi-documents#use-swagger-ui-for-local-ad-hoc-testing>.
852880

881+
:::moniker-end
882+
853883
A secure weather forecast data endpoint is in the project's `Program` file:
854884

855885
```csharp

aspnetcore/blazor/security/includes/troubleshoot-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ One approach to prevent lingering cookies and site data from interfering with te
9393

9494
### App upgrades
9595

96-
A functioning app may fail immediately after upgrading either the .NET Core SDK on the development machine or changing package versions within the app. In some cases, incoherent packages may break an app when performing major upgrades. Most of these issues can be fixed by following these instructions:
96+
A functioning app may fail immediately after upgrading either the .NET SDK on the development machine or changing package versions within the app. In some cases, incoherent packages may break an app when performing major upgrades. Most of these issues can be fixed by following these instructions:
9797

9898
1. Clear the local system's NuGet package caches by executing [`dotnet nuget locals all --clear`](/dotnet/core/tools/dotnet-nuget-locals) from a command shell.
9999
1. Delete the project's `bin` and `obj` folders.

0 commit comments

Comments
 (0)