-
Notifications
You must be signed in to change notification settings - Fork 474
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
WinForm Sample - unable to run due to error ('Object reference not set to an instance of an object.') #42
Comments
same error, System.NullReferenceException: 'Object reference not set to an instance of an object.'
|
Thanks for trying out the sample apps! Can you expand a bit on what you were trying to do when you experienced this error? Is there a specific action within the app that led to this, or was it on launch? |
Application could not launch, it throw System.NullReferenceException on Form InitializeComponent . |
Using "Version 84.0.522.40 (Official build)" the problem is still present. |
@LukeOwlclaw Can you tell me what channel that Edge build is? What version of the SDK are you using? Could you add some repro steps that led to that error for you? @MinChanSike Glad the issue resolved for you! |
@champnic I just installed Edge and did not change the channel. Then I created a WinForms C# project (.NET Framework 4.7.2), installed WebView2 NuGet version 0.9.515-prerelease (because that is the latest version which supports my Edge version), dropped a |
@LukeOwlclaw Are you using the stable channel of Edge? If so you need to use a Canary or Dev build of Edge. Or you can use the WebView2 Runtime. I just tried your steps locally (Using 0.9.515-prerelease, VS 2019 16.6.2, WV2RT 85.0.564.8) and created a WinForms app, dropped the control, and it worked fine. |
Yes, I am using the stable channel. It is currently at 84.0.522.
So it should work, shouldn't it? |
Unfortunately we don't support the stable channel, only the Canary/Dev/Beta and the Runtime. @liminzhu has more details here: MicrosoftEdge/WebView2Feedback#341 (comment) |
@champnic Thanks for the link. Though I do not understand why the distribution channel matters if the release version is exactly the same. But I guess it'll come all together once it is released... |
I have the same problem |
@erpcto Is your issue with the sample app or your own app? |
This exception is prompted when my new program references the control and runs. |
What version of Edge/Runtime are you using? It's possible you're hitting MicrosoftEdge/WebView2Feedback#535. |
I use the Dev channel
|
in the winform sample system.nullreferenceexception came on
line
this.Controls.Add(this.webView2Control);
The text was updated successfully, but these errors were encountered: