-
Notifications
You must be signed in to change notification settings - Fork 375
Fix MSB3277 “WindowsBase” conflicts in dev apps by enabling WPF build ref #5482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 MSB3277 build warnings caused by conflicts between different versions of WindowsBase assemblies (4.0.0.0 vs 5.0.0.0) in SDK-style development/test projects. The conflict arises from the interaction between Microsoft.NETCore.App.Ref and Microsoft.Web.WebView2.Wpf.dll dependencies.
- Adds
<UseWPF>true</UseWPF>
property to affected SDK-style project files - Enables WPF build references to unify WindowsBase to the desktop pack version
- Resolves assembly reference conflicts without changing the application UI framework
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/devapps/WinFormsTestApp/WinFormsTestApp.csproj | Adds UseWPF property to resolve WindowsBase conflicts in WinForms test app |
tests/devapps/WAM/NetCoreWinFormsWam/NetCoreWinFormsWAM.csproj | Adds UseWPF property to resolve WindowsBase conflicts in WinForms WAM test app |
tests/devapps/NetFxConsoleTestApp/NetFxConsoleApp.csproj | Adds UseWPF property to resolve WindowsBase conflicts in console test app |
tests/devapps/Net5TestApp/Net5TestApp.csproj | Adds UseWPF property to resolve WindowsBase conflicts in Net5 test app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the warnings are gone. Thanks @gladjohn
Fixes - Build warning
Changes proposed in this request
After recent Desktop/UI changes (and newer WebView2), several SDK‑style dev/test projects (e.g., NetCoreWinFormsWAM, the net8.0-windows target of NetFxConsoleApp) began emitting MSB3277 warnings due to a reference‑graph conflict between WindowsBase 4.0.0.0 (facade from Microsoft.NETCore.App.Ref) and WindowsBase 5.0.0.0 (required by Microsoft.Web.WebView2.Wpf.dll).
This PR resolves the conflict by enabling WPF build references in the affected SDK‑style projects so WindowsBase unifies to the desktop pack version.
Testing
n/a
Performance impact
n/a
Documentation