-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null Reference Exception on start up #263
Comments
I had problem similar (if not the same) as yours. It turned out that the directives in the NuGet package don't specify that the the WebView2Loader.dll should be included. Maybe my solution will help you. I modified the two Microsoft.Web.WebView2.targets files in the NuGet package so that the ClickOnce (Publish) feature of Visual Studio would copy the WebView2Loader.dll to the AppPublish directory. I changed None to Content and Include to Included. This has been reported as a bug in Issue 228. Before
After
|
@dan-toadllc Could you try @mikemeinz change above and see if that fixes it? If so, we'll fix this as part of #228. |
@dan-toadllc We haven't heard back in a month so I'm closing this for now. If you are still running into this issue please reactivate and we'll take another look. Thanks! |
This is definitely an issue. I am not sure where you make the changes you have suggested mikemeinz.... I really want to use this control but it seems very tricky to get running at the moment. Any help would be greatly appreciated :-) |
@alexbitsnz On my PC, there are two files named Microsoft.Web.WebView2.targets. One of them is in C:\Users\USERNAME\.nuget\packages\microsoft.web.webview2\0.9.538-prerelease\build\native. The other file is in C:\Users\USERNAME\.nuget\packages\microsoft.web.webview2\0.9.538-prerelease\build. I used Windows Explorer Search to find them. I made the same edit in both files. See Jun 12 post above. |
Thank you Mike, that helped a lot :-) |
@alexbitsnz Glad @mikemeinz 's fix helped. We're tracking that issue in #228. |
I'm getting a NullReferenceException error on this line in Form1.Designer.cs:
this.Controls.Add(this.webView21);
I don't see anything that is null.
AB#26932580
The text was updated successfully, but these errors were encountered: