Fix running in browser wasm#7146
Merged
Merged
Conversation
MarcoRossignoli
approved these changes
Dec 17, 2025
Youssef1313
reviewed
Jan 8, 2026
| if (processPath is null) | ||
| { | ||
| // Fallback for environments where ProcessPath is null (e.g., browser OS) | ||
| string[] commandLineArgs = environment.GetCommandLineArgs(); |
Member
There was a problem hiding this comment.
Doesn't GetCommandLineArgs return empty array on browser?
This was referenced May 25, 2026
Evangelink
added a commit
that referenced
this pull request
May 25, 2026
After PRs #7137 and #7146, Microsoft.Testing.Platform boots on the wasi-wasm runtime, but the sample wouldn't even produce a `dotnet.wasm` bundle out of the box on the current preview SDK (`11.0.100-preview.5`): * `WorkloadManifest.Wasi.targets` only resolves `$(UsingWasiRuntimeWorkload)` to `true` when `$(TargetsCurrent)` (net11.0) is true, never when `$(TargetsNet10)` is true, so the WASI Sdk targets are never imported. * The pre-built `dotnet.wasm` tries to read `icudt.dat` from `cwd` even when `InvariantGlobalization` is on, so trimmed builds crash on startup. * `WasmSingleFileBundle=true` requires `wasi-sdk` (clang) to relink the native runtime, which is a heavy prerequisite for a sample. Set the matching properties explicitly on the project so a plain `dotnet publish` produces a runnable bundle, and document the new working build / run procedure (and the remaining `Task.Wait` blocker tracked in #5366) in the README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Contributes to #2196.
I have manually validated things are working with the fix:
I'll try to work on adding some acceptance test in a follow-up PR.