Repository navigation
fix: remove obsolete WebView2 SDK wiring - #25315
Doomguy-BFG9000 wants to merge 2 commits into
Conversation
morning4coffe-dev
left a comment
There was a problem hiding this comment.
Verified by code review at head 06488e2: the removed SDK wiring (targets, ImplicitPackagesResolver, PackageManifest, packages.json, buildschema), the remaining references to the removed names, runtime use of WebView2 (WebView2Aot), and the X11 addin's WebView2 type sources. The issue #25216 expected behavior matches the diff.
COMMENT
Findings (ranked):
- (Medium, docs out of date)
doc/articles/migrating-to-uno-7.md:117(on master, not touched by this PR) tells users to set<UnoDisableWebView2Workarounds>true</UnoDisableWebView2Workarounds>to keep the WPF reference and the alias workaround. This PR removes that property and the_UnoWebView2Workaround/_UnoWebView2RemoveWpftargets, so the documented setting now does nothing. Update the migration guide in this PR. - (Medium, unverified build risk)
src/SamplesApp/SamplesApp/SamplesApp.csproj:234has an explicit<PackageReference Include="Microsoft.Web.WebView2" Aliases="MsWebView2" />in the desktop ItemGroup. The removed_UnoWebView2Workaroundtarget applied the alias to theMicrosoft.Web.WebView2.CoreReferencePath for every PackageReference withAliasesmetadata, and that path includes this one. Uno.UI ships its ownMicrosoft.Web.WebView2.Corestubs (src/Uno.UI/Generated/3.0.0.0/Microsoft.Web.WebView2.Core/), so without the alias the two definitions may collide in the SamplesApp desktop head. No desktop build ran in CI for this PR. Please build SamplesApp fornet10.0-desktop(for example with-p:UnoTargetFrameworkOverride=net10.0-desktop) before merging. - (Low, PR checklist) "Contains NO breaking changes" is not quite accurate. The buildschema entry
MicrosoftWebView2Version, plus theUnoWebView2AliasesandUnoDisableWebView2Workaroundsproperties, are removed; setting them now silently does nothing. This is probably acceptable in the 7.0 dev cycle, but state it in the PR body and in the migration guide. - (Positive, no action) The runtime uses only WebView2Aot (
src/Uno.UI.Runtime.Win32/Uno.UI.Runtime.Win32.csproj:29). The X11 addin'sMicrosoft.Web.WebView2.Coretypes come from Uno.UI's generated stubs, so it does not depend on the removed package. Nothing else in the tree referencesMicrosoftWebView2Version,UnoWebView2Aliasesor theMicrosoftWebView2group.
Not validated: I did not run dotnet build or dotnet pack, and the author's "Uno.Sdk build and pack completed successfully / packed-SDK evaluation passed" is author-reported. The PR's CI shows only triage, docs, Codacy, WIP and summary checks; no build job ran, so item 2 is not covered by CI.
|
Hi @Doomguy-BFG9000, thanks a lot for this contribution! 🙏 Before we can merge it, could you please sign our Contributor License Agreement? The CLA assistant link is in the bot comment above: https://cla-assistant.io/unoplatform/uno?pullRequest=25315. It only takes a minute. Thank you! |
|
Addressed the review in 4461546:
git diff --check also passes. |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25315/docs/index.html |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25315/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25315/docs/index.html |
|
The build 239269 found UI Test snapshots differences: Details
|
|
Thanks for picking this up, and for the thorough cleanup across the SDK, schema and docs. While validating it, though, we found that removing the package completely causes two regressions:
#25996 takes a narrower approach. The implicit reference becomes Since #25996 replaces this PR, I'll close this one. Thanks again for the investigation, which is what led to the fix. |
GitHub Issue: closes #25216
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Remove obsolete WebView2 SDK wiring while preserving the generated package behavior.
Testing
Compatibility note
This change intentionally removes the MicrosoftWebView2Version, UnoWebView2Aliases, and UnoDisableWebView2Workarounds SDK properties. Existing settings are ignored after this change. The Uno 7 migration guide now documents the removal and explains how direct WebView2 consumers can use an explicit package reference with standard Aliases metadata.
Additional validation: SamplesApp built successfully for net10.0-desktop with 0 warnings and 0 errors.
PR Checklist ✅