MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Could not load type 'System.Windows.Forms.ContextMenu' from assembly 'System.Windows.Forms, Version=6.0.2.0
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
I am to use trying to use WebView2 for the first time in a WinForms application. I have installed NuGet Microsoft.Web.WebView2 109.1518.46. Microsoft Edge WebView2 Runtime 109.1518.78 is installed.
When selecting WebView2 from the Toolbox in Designer I get:
[17:28:44.233610] fail: Request failures: DesignerHosts/CreateComponent.
Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: Could not load type 'System.Windows.Forms.ContextMenu' from assembly 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
A screenshot of the error dialog:

I cannot exit Visual Studio 2022 unless I say to not save the solution. I have tried several times, using 1.0.1462.37 and a completely new Form.
The project is an existing library targeting net6.0-windows;net48. I am trying to replace the use of WebBrowser.
There is no use of ContextMenu in the solution. I understand it has long been replaced by ContextMenuStrip, which is not used in this Form.
Version
SDK: 109.1518.46
Runtime: 109.1518.78
OS: Win10, 19045.2486
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.