Skip to content

fix: add missing Microsoft.AspNetCore.Components.Forms using to WASM _Imports.razor#1

Merged
maikebing merged 1 commit into
mainfrom
copilot/fix-ibrowserfile-namespace-error
May 8, 2026
Merged

fix: add missing Microsoft.AspNetCore.Components.Forms using to WASM _Imports.razor#1
maikebing merged 1 commit into
mainfrom
copilot/fix-ibrowserfile-namespace-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

The WASM project failed to build because IBrowserFile (from Microsoft.AspNetCore.Components.Forms) was not imported in examples/AntDesign.X.Blazor.Demo.Wasm/_Imports.razor, while the server-side Demo project had it. This caused 10 CS0246 errors across Home.razor, AttachmentsDemo.razor, and SenderDemo.razor.

Change

  • Added @using Microsoft.AspNetCore.Components.Forms to examples/AntDesign.X.Blazor.Demo.Wasm/_Imports.razor, bringing it in sync with the Demo project's imports.

@maikebing maikebing marked this pull request as ready for review May 8, 2026 09:17
Copilot AI review requested due to automatic review settings May 8, 2026 09:17
@maikebing maikebing merged commit 5def777 into main May 8, 2026
3 checks passed
@maikebing maikebing deleted the copilot/fix-ibrowserfile-namespace-error branch May 8, 2026 09:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a build break in the WASM demo by aligning its global Razor imports with the server-side demo so components using IBrowserFile compile successfully.

Changes:

  • Added @using Microsoft.AspNetCore.Components.Forms to the WASM project’s _Imports.razor to make IBrowserFile available during Razor compilation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants