Oct 13 2020 02:59 PM - edited Oct 13 2020 03:01 PM
Hello;
I am at 'Step 3 - Create a single WebView'
https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/winforms
But when I compile program I get the following error;
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Microsoft.Web.WebView2.WinForms
StackTrace:
at Microsoft.Web.WebView2.WinForms.WebView2.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.AssignParent(Control value)
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at WinFormsGettngStarted.Form1.InitializeComponent() in C:\Users\vmars\source\repos\WinFormsGettngStarted\Form1.Designer.cs:line 50
From this line: this.Controls.Add(this.webView);
How can I get past this error ?
Thanks for yur Help...
Oct 15 2020 03:08 PM
@vmars316 Thanks for reaching out, and welcome to our Insider community! I've reached out to our WebView feature owner, and will let you know if/when they have thoughts to share.
Fawkes (they/them)
Program Manager & Community Manager - Microsoft Edge
Oct 17 2020 11:29 AM
@Deleted
Please note this question is also outstanding
Thanks
Oct 26 2020 11:37 AM
@vmars316 Thanks for your patience. Here are the team's thoughts on your first question:
If you are still running into issues, you can check out our WebView2-specific feedback repo here:
MicrosoftEdge/WebView2Feedback: Feedback repo for Microsoft Edge WebView2 (github.com)
And it looks like someone from the team already addressed your second question, but let us know if you still have additional questions!
Fawkes (they/them)
Program Manager & Community Manager - Microsoft Edge
Jan 08 2021 11:58 AM
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Microsoft.Web.WebView2.WinForms
StackTrace:
at Microsoft.Web.WebView2.WinForms.WebView2.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Visual Studio 2019
Net Framework 4.8
Nuget: Microsoft.Web.WebView2 1.0.721-prerelease
Only When I click Exit button I have this error. From Microsoft Store Team said that any of the buttons don`t work and the rejected my app.
You can install my first version on this link published 30.11.2020 and there was no problem to publish.
Download link: http://go.microsoft.com/fwlink/?LinkId=532540&mstoken=
Enter this code: PJDD9-GWPJ9-C4QM7-67R34-2CYYZ The Umbrella website: http://11323444.450552.renderforestsites.com
Jan 08 2021 12:19 PM
Only when I click Exit (X) Button I have this same Error.
Visual Studio 2019
NET Framework 4.8
Microsoft.Web.WebView2 1.0.721-prerelease
From Microsoft Store I get this argument for the rejection: Unfortunately, we can’t test your product, the product's primary functions are not usable.
Steps to reproduce:
1. Launch the app.
2. Notice that selecting any of the options shows the error "Unhandled exception has occurred in your application".
If you want to see my first version of my app click on the link an insert this code:PJDD9-GWPJ9-C4QM7-67R34-2CYYZ.