Deprecate the Blazor WebAssembly DevServer package#67862
Conversation
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR makes the retirement of the standalone Blazor WebAssembly DevServer explicit by updating its package messaging and adding a runtime startup warning that directs developers to the newer Gateway host.
Changes:
- Updated DevServer package description and
PACKAGE.mdto state the package is deprecated and point toMicrosoft.AspNetCore.Components.Gateway. - Added a startup-time log warning in the DevServer host to surface migration guidance when the package is actually used.
- Normalized the XML prolog line in
CompatibilitySuppressions.xml(removing a leading BOM/indentation).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Framework/App.Runtime/src/CompatibilitySuppressions.xml | Normalizes the XML header line formatting (removes BOM/indentation). |
| src/Components/WebAssembly/DevServer/src/Server/Startup.cs | Logs a deprecation warning at startup; adds a logger dependency to Configure. |
| src/Components/WebAssembly/DevServer/src/PACKAGE.md | Updates package documentation to recommend Gateway over DevServer. |
| src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj | Updates the NuGet description to clearly indicate deprecation and the replacement package. |
| #pragma warning disable CS0618 // This middleware is deprecated as part of the DevServer deprecation path. The replacement is Microsoft.AspNetCore.Components.Gateway. | ||
| app.UseWebAssemblyDebugging(); | ||
| #pragma warning restore CS0618 |
| ``` | ||
|
|
||
| Make sure that the newly-added `<PackageReference />` in the `.csproj` file includes `PrivateAssets="all"`: | ||
| If you still need to reference the legacy package for compatibility reasons, make sure that the newly-added `<PackageReference />` in the `.csproj` file includes `PrivateAssets="all"`: |
| @@ -1,4 +1,4 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
|
@copilot fix the comments |
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
The obsoletion of UseWebAssemblyDebugging and its required suppression are owned by PR #67861. This PR only adds the DevServer deprecation startup warning; the ASPDEPR011 pragma is dropped here to avoid duplicating the suppression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9e4d745c-a233-409a-a399-2e2d750bc5c3
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Head branch was pushed to by a user without write access
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
|
Restored D:\a_work\1\s\src\Servers\Connections.Abstractions\src\Microsoft.AspNetCore.Connections.Abstractions.csproj (in 4 ms). Build FAILED. D:\a_work\1\s\src\Identity\test\Identity.Test\Microsoft.AspNetCore.Identity.Test.csproj : error NU1902: Warning As Error: Package 'AngleSharp' 0.9.9 has a known moderate severity vulnerability, GHSA-pgww-w46g-26qg [D:\a_work\1\s.dotnet\sdk\11.0.100-preview.6.26318.108\NuGet.targets] Time Elapsed 00:04:17.31 Rebase and fix the issue |
…zor-devserver-package Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Head branch was pushed to by a user without write access
Done in a0663f6. The branch was behind On the restore failure: the |
The standalone Blazor WebAssembly DevServer is being retired in favor of the newer Gateway host. This change makes that transition explicit by marking the package as deprecated, directing consumers to Gateway, and surfacing a clear startup warning so the migration path is visible where the package is actually used.
Package deprecation
Microsoft.AspNetCore.Components.WebAssembly.DevServeras deprecated in package metadata and documentMicrosoft.AspNetCore.Components.Gatewayas the replacement.PACKAGE.mdto present Gateway as the recommended hosting path for standalone Blazor WebAssembly apps.Runtime guidance
blazor-devserverat startup so developers see the migration guidance immediately.UseWebAssemblyDebugging()call with a targeted suppression comment so the DevServer project continues to build during the deprecation transition.