Separate media components into Microsoft.AspNetCore.Components.Media package#67130
Open
Copilot wants to merge 2 commits into
Open
Separate media components into Microsoft.AspNetCore.Components.Media package#67130Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…package Move Image, Video, FileDownload, MediaSource, MediaContext, and MediaComponentBase from Microsoft.AspNetCore.Components.Web into a new standalone Microsoft.AspNetCore.Components.Media package. Update namespace from Microsoft.AspNetCore.Components.Web.Media to Microsoft.AspNetCore.Components.Media. - Create new src/Components/Media/src project - Create new src/Components/Media/test project with all media unit tests - Remove media files from Web project and its PublicAPI - Update BasicTestApp and _Imports.razor to use new namespace - Register new project in eng/ProjectReferences.props - Update AspNetCore.slnx and solution filters Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
javiercn
June 10, 2026 16:09
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extracts the Blazor media component suite (Image, Video, FileDownload, plus supporting types) out of Microsoft.AspNetCore.Components.Web into a new standalone Microsoft.AspNetCore.Components.Media package, including a namespace move from Microsoft.AspNetCore.Components.Web.Media to Microsoft.AspNetCore.Components.Media.
Changes:
- Introduces a new
src/Components/Media/library + test project, with corresponding PublicAPI files. - Updates test assets (
BasicTestApp) and unit tests to reference the new package/namespace. - Wires the new projects into repo infrastructure (project reference providers and solution/solution-filter inclusion) and updates
Components.Web’s unshipped API list to reflect the move.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Components/Web/src/PublicAPI.Unshipped.txt | Removes the unshipped Microsoft.AspNetCore.Components.Web.Media API entries now moved to the new package. |
| src/Components/test/testassets/BasicTestApp/MediaTest/VideoTestComponent.razor | Updates @using to the new Microsoft.AspNetCore.Components.Media namespace. |
| src/Components/test/testassets/BasicTestApp/MediaTest/ImageTestComponent.razor | Updates @using to the new Microsoft.AspNetCore.Components.Media namespace. |
| src/Components/test/testassets/BasicTestApp/MediaTest/FileDownloadTestComponent.razor | Updates @using to the new Microsoft.AspNetCore.Components.Media namespace. |
| src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj | Adds a reference to Microsoft.AspNetCore.Components.Media for the test app. |
| src/Components/test/testassets/BasicTestApp/_Imports.razor | Updates global imports to the new media namespace. |
| src/Components/Media/test/Microsoft.AspNetCore.Components.Media.Tests.csproj | Adds the new Media test project. |
| src/Components/Media/test/ImageTest.cs | Moves unit tests to the new namespace and updates usings to Components.Media. |
| src/Components/Media/test/FileDownloadTest.cs | Moves unit tests to the new namespace and updates usings to Components.Media. |
| src/Components/Media/src/Video.cs | Updates namespace to Microsoft.AspNetCore.Components.Media. |
| src/Components/Media/src/PublicAPI.Unshipped.txt | Adds the unshipped public API surface for the new package. |
| src/Components/Media/src/PublicAPI.Shipped.txt | Adds initial shipped API file for the new assembly. |
| src/Components/Media/src/Microsoft.AspNetCore.Components.Media.csproj | Adds the new Media library project and its references/metadata. |
| src/Components/Media/src/MediaSource.cs | Updates namespace to Microsoft.AspNetCore.Components.Media. |
| src/Components/Media/src/MediaContext.cs | Updates namespace to Microsoft.AspNetCore.Components.Media. |
| src/Components/Media/src/MediaComponentBase.cs | Updates namespace to Microsoft.AspNetCore.Components.Media. |
| src/Components/Media/src/Image.cs | Updates namespace to Microsoft.AspNetCore.Components.Media. |
| src/Components/Media/src/FileDownload.cs | Updates namespace to Microsoft.AspNetCore.Components.Media. |
| src/Components/ComponentsNoDeps.slnf | Includes the new Media projects in the “no deps” solution filter. |
| src/Components/Components/src/Microsoft.AspNetCore.Components.csproj | Adds InternalsVisibleTo for the new Media test assembly. |
| src/Components/Components.slnf | Includes the new Media projects in the Components solution filter. |
| eng/ProjectReferences.props | Registers Microsoft.AspNetCore.Components.Media as a reference provider for repo build infrastructure. |
| AspNetCore.slnx | Adds the new Media projects to the main solution structure. |
…ew Media package Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract media components into standalone
Microsoft.AspNetCore.Components.Mediapackage.Description
Moves
Image,Video,FileDownload,MediaSource,MediaContext, andMediaComponentBaseout ofMicrosoft.AspNetCore.Components.Webinto their own package as discussed in #63540.Namespace change:
Microsoft.AspNetCore.Components.Web.Media→Microsoft.AspNetCore.Components.MediaNew package structure:
src/Components/Media/src/— library targetingMicrosoft.AspNetCore.Components+Microsoft.JSInterop(noWebdependency)src/Components/Media/test/— unit tests (all 14 pass)What was removed from
Microsoft.AspNetCore.Components.Web:Web/src/Media/directory (6 source files)Web/test/Media/directory (2 test files)Web.Media.*entries fromPublicAPI.Unshipped.txtInfrastructure:
eng/ProjectReferences.propsAspNetCore.slnx,Components.slnf,ComponentsNoDeps.slnfInternalsVisibleToadded for test project inMicrosoft.AspNetCore.Components.csprojBasicTestAppupdated to reference new package and namespace