0

I use costura.fody for packaging, although the packaging is successful, but I run the program, double-click the corresponding function point to trigger the event, webview2 does not work.

It's like I only drew a UI page, and didn't give it the actual function. In fact, the event of this function point is to pop up a new page and call webview2 to display information.

I also used some methods, such as embedding webview2-related files into my program and then packaging them. I also tried to change the configuration file of costura.fody, directly import the address of webview2 related files and then pack it. Actually, it doesn't help much. Read a lot of information, without exception, most of them have been tried.

I tried the related library of embedded webview2, but it reported an error

Severity    Code    Description Project File    Line    Suppression State
Error   CS1752  Interop type 'WebView2' cannot be embedded. Use the applicable interface instead.   data_view   C:\Users\xxx\Desktop\xxx\pro\Sharp_10_packeg\xxx\xxx_view.Designer.cs   102 Active


Severity    Code    Description Project File    Line    Suppression State
Error   CS1752  Interop type 'WebView2' cannot be embedded. Use the applicable interface instead.   data_view   C:\Users\xxx\Desktop\xxx\pro\Sharp_10_packeg\xxx\xxx_view.Designer.cs   33  Active


Severity    Code    Description Project File    Line    Suppression State
Error       Unable to delete file "bin\Release\x64\SQLite.Interop.dll". Access to the path 'C:\Users\xxx\Desktop\xxx\pro\Sharp_10_packeg\xxx\bin\Release\x64\SQLite.Interop.dll' is denied. xxx_view            

I have tried embedding webview2 into the program.

Also tried changing the address of webview2 in costura.fody.

Although these two methods can be compiled directly, webview2 still cannot be run, and the double-click event still does not respond, and there is no pop-up window

anton
  • 9
  • 1

0 Answers0