Reputation: 47
Just installed Nuget, "Microsoft.Toolkit.Forms.UI.Controls.WebView" and trying to use the web browser "Edge" but when I am dragging the control into the form it gives me an exception:
"Failed to create webview. The error is message following: System.TypeLoadExcpetion: Could not find Windows.runtime type: Could not find windows.runtime type : Windows.Web.UI.interop.WebViewControlProcess at microsoft.toolkit.Form.UI.Controls..WebView.get_Enterprise()'
is there any solution for this kind of error?
Upvotes: 2
Views: 1605
Reputation: 1
I know this is an old thread but I am running VS 2015 and upgraded my .NET Framework to 4.8 and the webview and webviewcompatability controls both work just fine.
Upvotes: 0
Reputation: 39082
There are several prerequisites for using the toolkit controls in Windows Forms apps:
- Visual Studio 2017.
- Windows 10 Insider Preview Build 17110 or a later release.
- .NET Framework 4.6.2 or a later release.
- Configure your application for high DPI support. To learn how, see this section of the guide.
Update to the latest version of Visual Studio 2017.
Update to the latest available version of Windows 10 (ideally the October 2018 update and later).
Make sure your project is targeting .NET Framework 4.6.2 or later by right-clicking the project in Solution Explorer and selecting Properties. I think this may be the most likely reason for your problem.
Enable HDPI support based on this guide.
Upvotes: 3