You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nowdays I am developing a Microsoft Word Add-in using C#. Some features in this Add-in such like code words highlighting in MS Word is difficult to implement in C#, so I decided to use JS and highlight.js.
But it looks like that webview2 does not work in VSTO dev. Even in a normal WinForm project, the demo still cannot work well. I just darg and drop a webview2 control to the main window. When I hit F5 to debug, the exception occured.
System.NullReferenceException
HResult=0x80004003
Message=未将对象引用设置到对象的实例。
Source=Microsoft.Web.WebView2.WinForms
StackTrace:
at Microsoft.Web.WebView2.WinForms.WebView2.OnVisibleChanged(EventArgs e)
I do believe the JS calling from VSTO is very essential for developers, espcially in Microsoft Word. Nowdays many operations such as code highlighting which looks like listings in LaTeX cannot implemented in C# easily. I hope Microsoft can enhance this module in the future.
Nowdays I am developing a Microsoft Word Add-in using C#. Some features in this Add-in such like code words highlighting in MS Word is difficult to implement in C#, so I decided to use JS and highlight.js.
But it looks like that webview2 does not work in VSTO dev. Even in a normal WinForm project, the demo still cannot work well. I just darg and drop a webview2 control to the main window. When I hit F5 to debug, the exception occured.
I don't know why and I just follow the guide in https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/winforms
I need your help.
The text was updated successfully, but these errors were encountered: