+/// <Environment Include="Development">
+/// <div class="alert alert-warning">
+/// You are running in Development mode. Debug features are enabled.
+/// </div>
+/// </Environment>
+///
+/// <Environment Include="Development, Staging">
+/// <p>This is a pre-production environment.</p>
+/// </Environment>
+///
+/// <Environment Exclude="Production">
+/// <p>Debug information: @DateTime.Now</p>
+/// </Environment>
+///
+///
-/// <Environment Include="Development">
+/// <EnvironmentBoundary Include="Development">
/// <div class="alert alert-warning">
/// You are running in Development mode. Debug features are enabled.
/// </div>
-/// </Environment>
+/// </EnvironmentBoundary>
///
-/// <Environment Include="Development, Staging">
+/// <EnvironmentBoundary Include="Development, Staging">
/// <p>This is a pre-production environment.</p>
-/// </Environment>
+/// </EnvironmentBoundary>
///
-/// <Environment Exclude="Production">
+/// <EnvironmentBoundary Exclude="Production">
/// <p>Debug information: @DateTime.Now</p>
-/// </Environment>
+/// </EnvironmentBoundary>
///
/// Current Environment: @HostEnvironment.EnvironmentName
+ +@code { + [Inject] + public Microsoft.Extensions.Hosting.IHostEnvironment HostEnvironment { get; set; } = default!; +} From 4b1e0c7e075449efecc5a0da82e6bdeb336d791a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:14:44 +0000 Subject: [PATCH 5/7] Remove redundant Microsoft.Extensions.Hosting.Abstractions references and XML doc comments Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com> --- .../Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj | 1 - .../src/Hosting/WebAssemblyHostEnvironmentAdapter.cs | 3 --- .../src/Microsoft.AspNetCore.Components.WebAssembly.csproj | 1 - 3 files changed, 5 deletions(-) diff --git a/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj index b065dbe59dfd..d4fe6205d0ad 100644 --- a/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj +++ b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj @@ -10,7 +10,6 @@