Skip to content

Enable and fix WASM tests#52960

Merged
tmat merged 4 commits intodotnet:release/10.0.3xxfrom
tmat:WasmTests
Feb 19, 2026
Merged

Enable and fix WASM tests#52960
tmat merged 4 commits intodotnet:release/10.0.3xxfrom
tmat:WasmTests

Conversation

@tmat
Copy link
Member

@tmat tmat commented Feb 10, 2026

Fixes Microsoft.DotNet.HotReload.WebAssembly.Browser asset layout. The test were failing to build WASM projects because Microsoft.DotNet.HotReload.WebAssembly.Browser.lib.module.js and Microsoft.DotNet.HotReload.WebAssembly.Browser.dll were not copied to the right directories.

Reenables WASM Hot Reload tests in dotnet-watch test suite.

{
stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
}
catch (FileNotFoundException)
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to follow up on why the manifest is sometimes not be produced by the build... #52994

@tmat
Copy link
Member Author

tmat commented Feb 17, 2026

@maraf ptal

Copy link
Contributor

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 WASM hot reload test failures by correcting the asset layout for Microsoft.DotNet.HotReload.WebAssembly.Browser. The tests were failing because the hot reload agent DLL and JavaScript module were not being copied to the correct directory structure in the SDK package. The fix centralizes target framework versioning and updates the ProjectReference configuration to properly include the hot reload agent outputs.

Changes:

  • Fixed WASM hot reload asset paths (removed incorrect wwwroot\ prefix from package layout)
  • Introduced centralized target framework version management via TargetFrameworks.props
  • Re-enabled previously skipped WASM hot reload tests across Windows and non-Windows platforms

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/WasmSdk/Sdk/TargetFrameworks.props New file defining centralized WASM agent target framework version (net10.0)
src/WasmSdk/Tasks/Microsoft.NET.Sdk.WebAssembly.Tasks.csproj Updated ProjectReference to use OutputItemType/PackagePath/Targets for proper asset inclusion; removed manual AdditionalContent include; added TargetFrameworks.props import; updated CopyAdditionalFilesToLayout condition
src/WasmSdk/Sdk/Sdk.targets Fixed source path for hot reload JS module (removed wwwroot\ prefix); uses WasmAgentTargetFrameworkV10 property; imports TargetFrameworks.props
src/BuiltInTools/HotReloadAgent.WebAssembly.Browser/Microsoft.DotNet.HotReload.WebAssembly.Browser.csproj Uses centralized WasmAgentTargetFrameworkV10 property instead of hardcoded net10.0
test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs Removed Windows-only restrictions and Skip attributes from WASM tests; added identifier parameter for test isolation; updated test assertions; fixed typo ("it's" → "its"); updated issue reference from #49928 to #53058
test/dotnet-watch.Tests/Browser/BrowserTests.cs Removed Windows-only restriction from BrowserDiagnostics test
src/BuiltInTools/Watch/Build/EvaluationResult.cs Fixed file extension comparison to use case-appropriate string comparison
src/BuiltInTools/HotReloadClient/Web/StaticWebAssetsManifest.cs Added explicit FileNotFoundException handling to avoid error logging for expected missing files

Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

WasmSDK bits look good to me 👍

@tmat
Copy link
Member Author

tmat commented Feb 18, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tmat
Copy link
Member Author

tmat commented Feb 19, 2026

/ba-g Linux machine is crashing with no logs.

@tmat tmat merged commit e9ee772 into dotnet:release/10.0.3xx Feb 19, 2026
26 of 28 checks passed
@tmat tmat deleted the WasmTests branch February 19, 2026 19:30
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