Open
Conversation
Contributor
|
Thanks for your PR, @@javiercn. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses Blazor WebAssembly static web assets test failures by updating test assets and expectations to match current framework packaging/output, and by re-enabling previously skipped tests once baselines are refreshed.
Changes:
- Re-enabled multiple previously skipped Blazor WASM SWA tests gated by MSBuild version requirements.
- Updated the
BlazorWasmReferencedByAspNetCoreServertest asset to use$(AspNetTestTfm)and refreshed ASP.NET Core package references + hosting code paths. - Regenerated/updated static web assets baselines to reflect current compressed asset/assembly outputs (including removed/merged assemblies).
Reviewed changes
Copilot reviewed 19 out of 31 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/TestAssets/TestProjects/BlazorWasmReferencedByAspNetCoreServer/Server/Server.csproj | Switches to $(AspNetTestTfm) and updates package references for the server test asset. |
| test/TestAssets/TestProjects/BlazorWasmReferencedByAspNetCoreServer/Server/Program.cs | Simplifies middleware setup to a compatible hosted WASM static file pattern. |
| test/TestAssets/TestProjects/BlazorWasmReferencedByAspNetCoreServer/Client/Program.cs | Simplifies client entry point for the test asset. |
| test/TestAssets/TestProjects/BlazorWasmReferencedByAspNetCoreServer/Client/Client.csproj | Switches to $(AspNetTestTfm) and refreshes WebAssembly package references. |
| test/TestAssets/TestProjects/BlazorWasmReferencedByAspNetCoreServer/Client/App.razor | Removes FocusOnNavigate to align with older-compatible client template surface. |
| test/TestAssets/TestProjects/BlazorWasmReferencedByAspNetCoreServer/Client/_Imports.razor | Removes unused/older imports not needed by the simplified test asset. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/WasmPublishIntegrationTest.cs | Unskips MSBuild-gated publish tests and updates assertion for merged logging assembly output. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/WasmJsModulesIntegrationTests.cs | Unskips MSBuild-gated JS module tests. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_PublishMinimal_Works.Publish.files.json | Updates expected publish file list to match current framework assembly set and compression outputs. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_Hosted_Works.Publish.files.json | Updates hosted publish file baseline for current assembly/compression outputs. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Publish_DoesNotIncludeXmlDocumentationFiles_AsAssets.Publish.files.json | Updates publish baseline for current assembly/compression outputs while validating XML docs exclusion. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_HostedApp_ReferencingNetStandardLibrary_Works.Build.staticwebassets.json | Refreshes SWA manifest baseline (including AssetGroups field emission). |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_BuildMinimal_Works.Build.files.json | Updates build baseline for minimal app to match current compressed/webcil outputs. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_Build_Hosted_Works.Build.files.json | Updates build baseline for hosted app to match current compressed outputs. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/StaticWebAssets_BackCompatibilityPublish_Hosted_Works.Publish.staticwebassets.json | Updates back-compat publish SWA manifest baseline (including AssetGroups). |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifest.Publish.files.json | Updates JS-modules publish baseline to match current output set. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_Hosted_CanCustomizeBlazorInitialization.Publish.files.json | Updates hosted JS modules publish baseline for current output set. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanHaveDifferentBuildAndPublishModules.Publish.files.json | Updates JS modules publish baseline for current output set. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/JsModules_CanCustomizeBlazorInitialization.Publish.files.json | Updates JS modules publish baseline for current output set. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorWasmStaticWebAssetsIntegrationTest.cs | Unskips MSBuild-gated static web assets integration tests. |
Comment on lines
1
to
2
| using System; | ||
|
|
There was a problem hiding this comment.
using System; appears unused in this file and can trigger CS8019 (unnecessary using directive). Please remove it to keep the test asset warning-clean.
Suggested change
| using System; |
- Remove Skip attributes from 13 tests - Fix BlazorWasmReferencedByAspNetCoreServer test asset: use and instead of hardcoded net11.0/10.0.0-rc.1.25451.107 - Remove builder.Services.AddScoped call that hits CS0012 (DI Abstractions merged into DI in preview.4) - Fix Publish_WithTrimmingdDisabled_Works: check Microsoft.Extensions.Logging.wasm instead of Abstractions (merged in .NET 11) - Regenerate stale baselines for compressed asset changes
199e36f to
e483b50
Compare
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.
Fixes #53791
This PR fixes all static web assets related Blazor WASM test failures:
Skipattributes from 13 tests acrossBlazorWasmStaticWebAssetsIntegrationTest,WasmJsModulesIntegrationTests, andWasmPublishIntegrationTestBlazorWasmReferencedByAspNetCoreServertest asset — replaced hardcodednet11.0TFM and stale10.0.0-rc.1.25451.107package versions with$(AspNetTestTfm)/Version="5.0.0", and simplified Client/Server code to use 5.0-compatible APIsPublish_WithTrimmingdDisabled_Works—Microsoft.Extensions.Logging.Abstractions.wasmno longer exists in .NET 11 (merged intoMicrosoft.Extensions.Logging); updated the assertion accordingly