diff --git a/aspnetcore/blazor/fundamentals/environments.md b/aspnetcore/blazor/fundamentals/environments.md index 2b7d3da2993d..373a1cf17a09 100644 --- a/aspnetcore/blazor/fundamentals/environments.md +++ b/aspnetcore/blazor/fundamentals/environments.md @@ -38,7 +38,7 @@ On the client for a Blazor Web App, the environment is determined from the serve ``` -For a standalone Blazor WebAssembly app, set the environment with the `` property in the app's project file (`.csproj`). The following example sets the `Staging` environment: +For a standalone Blazor WebAssembly app, set the environment with the `` MSBuild property in the app's project file (`.csproj`). The following example sets the `Staging` environment: ```xml Staging @@ -46,6 +46,42 @@ For a standalone Blazor WebAssembly app, set the environment with the ` + Development + + + + Production + + ``` + +* The environment can be set based on the use of a publish profile. In the following example, the first condition sets the environment to `Development` when no publish profile is used (applies to both build and publish operations without a profile), while the second condition covers setting the environment to `Production` when any publish profile is used: + + ```xml + + Development + + + + Production + + ``` + +* Create a custom server-side web API endpoint. The standalone Blazor WebAssembly app requests its environment from the web API either at app startup or on-demand while it's running. The value should be passed to [`WebAssemblyStartOptions`](https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts#L7) or with [`withApplicationEnvironment`](https://github.com/dotnet/aspnetcore/blob/main/src/Components/dotnet-runtime-js/dotnet.d.ts#L110). + + [!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)] + :::moniker-end :::moniker range=">= aspnetcore-8.0 < aspnetcore-10.0" diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md index 649280c8c0ef..65a17c54b44a 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md @@ -207,6 +207,8 @@ The default environments are: * `Development` for build. * `Production` for publish. +For more information, see . + ### Boot configuration file inlined Blazor's boot configuration, which prior to the release of .NET 10 existed in a file named `blazor.boot.json`, has been inlined into the `dotnet.js` script. This only affects developers who are interacting directly with the `blazor.boot.json` file, such as when developers are: