feat: Compile .wasm.cs and .browserwasm.cs files for WebAssembly#22690
feat: Compile .wasm.cs and .browserwasm.cs files for WebAssembly#22690MartinZikmund wants to merge 11 commits intomasterfrom
.wasm.cs and .browserwasm.cs files for WebAssembly#22690Conversation
|
@copilot Document the newly added support for |
|
@MartinZikmund I've opened a new pull request, #22691, to work on those changes. Once the pull request is ready, I'll request review from you. |
…# guide Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates Uno’s cross-targeting MSBuild item rules so platform-suffixed C# files are compiled appropriately when targeting the newer browserwasm platform (in addition to the existing WebAssembly runtime identifier flow).
Changes:
- Adjust
.wasm.csinclusion/removal conditions to allow compilation whenIsBrowserWasm=true. - Add new default item handling for
.browserwasm.csfiles so they compile only for BrowserWasm targets.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Uno.Sdk/targets/Uno.CrossTargeting.targets | Updates cross-targeting item conditions for .wasm.cs and introduces .browserwasm.cs gating for BrowserWasm builds. |
| src/Uno.CrossTargetting.targets | Mirrors the same item condition updates for solution-wide cross-targeting behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| <None Include="**\*.wasm.cs" Exclude="bin\**\*.wasm.cs;obj\**\*.wasm.cs" Condition="'$(UnoRuntimeIdentifier)'!='WebAssembly'" /> | ||
| <Compile Remove="**\*.wasm.cs" Condition="'$(UnoRuntimeIdentifier)'!='WebAssembly'" /> | ||
| <None Include="**\*.wasm.cs" Exclude="bin\**\*.wasm.cs;obj\**\*.wasm.cs" Condition="'$(UnoRuntimeIdentifier)'!='WebAssembly' AND '$(IsBrowserWasm)'!='true'" /> |
There was a problem hiding this comment.
PR description currently says "closes #" but does not reference an actual GitHub issue. Please update the PR description to include a fully-qualified issue link in a Fixes/Closes/Related footer (e.g., "Closes https://github.com/unoplatform//issues/<ISSUE_NUMBER>") or add the approved "No related issue" note if applicable.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22690/wasm-skia-net9/index.html |
|
@copilot adjust the condition to make both suffixes apply in both "isbrowserwasm" and "unoruntime=webassembly" cases |
|
@MartinZikmund I've opened a new pull request, #22698, to work on those changes. Once the pull request is ready, I'll request review from you. |
…rWasm and UnoRuntime=WebAssembly Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
feat: Compile `.wasm.cs` and `.browserwasm.cs` files for WebAssembly
|
|
Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
…wasm.cs Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
Clarified file naming conventions
feat: Compile `.wasm.cs` and `.browserwasm.cs` files for WebAssembly
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Starting from Uno Platform 5.2, in project or class libraries using the `Uno.Sdk`, a set of implicit file name conventions can be used to target specific platforms: | ||
|
|
||
| * `*.wasm.cs` is built only for `net10.0-browserwasm` | ||
| * `*.browserwasm.cs` is built only for `net10.0-browserwasm` |
There was a problem hiding this comment.
The list now includes both *.wasm.cs and *.browserwasm.cs with the same description ("built only for net9.0-browserwasm") which is ambiguous for readers. Please clarify the intended difference between these suffixes (e.g., native WebAssembly vs Skia browserwasm), and adjust the "Starting from Uno Platform 5.2" wording if this new suffix is introduced in a later version. Also consider updating the Uno.Sdk cross-targeting docs elsewhere (e.g., doc/articles/features/using-the-uno-sdk.md) to include *.browserwasm.cs for consistency.
| Starting from Uno Platform 5.2, in project or class libraries using the `Uno.Sdk`, a set of implicit file name conventions can be used to target specific platforms: | |
| * `*.wasm.cs` is built only for `net10.0-browserwasm` | |
| * `*.browserwasm.cs` is built only for `net10.0-browserwasm` | |
| In projects or class libraries using the `Uno.Sdk`, a set of implicit file name conventions can be used to target specific platforms: | |
| * `*.browserwasm.cs` is built only for `net10.0-browserwasm` (recommended suffix for Browser WebAssembly) | |
| * `*.wasm.cs` is also built only for `net10.0-browserwasm` and is kept for backward compatibility with older Uno projects |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22690/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22690/docs/index.html |
|
|
GitHub Issue: closes #22689
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️