Last active
March 2, 2026 12:41
-
-
Save yamamaya/f74f629252f42bfca5801b0b7ee7267a to your computer and use it in GitHub Desktop.
How to resolve MSB3277 happen with WebView2
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
| <Target Name="_removeUnusedWebView2" BeforeTargets="ResolveAssemblyReferences"> | |
| <ItemGroup> | |
| <Reference Remove="@(Reference->WithMetadataValue('FileName', 'Microsoft.Web.WebView2.WinForms'))" Condition="'$(UseWindowsForms)' != 'true'" /> | |
| <Reference Remove="@(Reference->WithMetadataValue('FileName', 'Microsoft.Web.WebView2.Wpf'))" Condition="'$(UseWpf)' != 'true'" /> | |
| </ItemGroup> | |
| </Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment