Fix MSB3277 “WindowsBase” conflicts in dev apps by enabling WPF build ref#5482
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 |
Avery-Dunn
approved these changes
Sep 19, 2025
This was referenced Sep 26, 2025
This was referenced Sep 29, 2025
This was referenced Oct 13, 2025
This was referenced May 14, 2026
Closed
This was referenced Jun 5, 2026
Closed
Closed
This was referenced Jun 19, 2026
Closed
Closed
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.
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