WebView2 #xpa #dotnet


Adrian Wick
 

Hi,

has anyone managed to use https://docs.microsoft.com/sl-si/microsoft-edge/webview2/get-started/winforms with magic?

Regarsd,
A


Craig Martin
 


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Tuesday, March 8, 2022 5:22 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: [magicu-l] WebView2 #xpa #dotnet
 
Hi,

has anyone managed to use https://docs.microsoft.com/sl-si/microsoft-edge/webview2/get-started/winforms with magic?

Regarsd,
A


Jim Stephenson
 

Craig, I am trying to setup that WebView2 demo and when I try to install the cab file I get the following message:

Deployment Image Servicing and Management tool
Version: 10.0.22567.1

Image Version: 10.0.22567.100

An error occurred trying to open - C:\Temp\Webview2.cab Error: 0x80070002

Error: 2

The system cannot find the file specified.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log



I had renamed it to WebView2.cab because I got the same message when it had its original name and just wanted to see if that made a difference.

Any ideas?


On Tue, Mar 8, 2022 at 9:00 AM Craig Martin <craig@...> wrote:


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Tuesday, March 8, 2022 5:22 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: [magicu-l] WebView2 #xpa #dotnet
 
Hi,

has anyone managed to use https://docs.microsoft.com/sl-si/microsoft-edge/webview2/get-started/winforms with magic?

Regarsd,
A


Adrian Wick
 

Thank you! I'll have a look tomorrow and report back to you!

regards,
A


Craig Martin
 

The first thing I'd suspect would be a corrupt or incomplete download from Microsoft, however the first hit google for that error gave:


Some things to check in there. I haven't encountered that error.


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Jim Stephenson <jstephen@...>
Sent: Tuesday, March 8, 2022 10:47 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] WebView2 #xpa #dotnet
 
Craig, I am trying to setup that WebView2 demo and when I try to install the cab file I get the following message:

Deployment Image Servicing and Management tool
Version: 10.0.22567.1

Image Version: 10.0.22567.100

An error occurred trying to open - C:\Temp\Webview2.cab Error: 0x80070002

Error: 2

The system cannot find the file specified.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log



I had renamed it to WebView2.cab because I got the same message when it had its original name and just wanted to see if that made a difference.

Any ideas?

On Tue, Mar 8, 2022 at 9:00 AM Craig Martin <craig@...> wrote:


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Tuesday, March 8, 2022 5:22 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: [magicu-l] WebView2 #xpa #dotnet
 
Hi,

has anyone managed to use https://docs.microsoft.com/sl-si/microsoft-edge/webview2/get-started/winforms with magic?

Regarsd,
A


Craig Martin
 

In some ways, this is a little academic since 4.8 now embeds CEFSharp but WebView2 is far more versatile, robust and better supported. I wouldn't be surprised if MSE swap to this in an upcoming release.
I have no special information on any of their cunning plans, however.


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Tuesday, March 8, 2022 10:51 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] WebView2 #xpa #dotnet
 
Thank you! I'll have a look tomorrow and report back to you!

regards,
A


Adrian Wick
 

I have downloaded the files and i have the same problem as i did with my application.
The dotnet object placed on the form is shown if i look it in generator. But when i try to run the problem, nothing is shown ... no error or anything.

F8 on the program also gives no error.

Regards
A


Adrian Wick
 

Hm,

how do i install cab file? I must have done something wrong with this ...

regards,
A


Craig Martin
 

Couple of way but easiest is you can right-click and extract the contents.


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Thursday, March 10, 2022 10:33 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] WebView2 #xpa #dotnet
 
Hm,

how do i install cab file? I must have done something wrong with this ...

regards,
A


Jim Stephenson
 

Craig, where should the contents be extracted to?


On Thu, Mar 10, 2022 at 3:09 PM Craig Martin <craig@...> wrote:
Couple of way but easiest is you can right-click and extract the contents.

From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Thursday, March 10, 2022 10:33 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] WebView2 #xpa #dotnet
 
Hm,

how do i install cab file? I must have done something wrong with this ...

regards,
A


Craig Martin
 

I'll need to revisit my notes, because I used an installer I think you can see from 

They can be anywhere but you'd need to change the CRR to reflect that location.
It's been a few months and the world got busy, I'll verify my steps again soon.


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Jim Stephenson <jstephen@...>
Sent: Thursday, March 10, 2022 2:13 PM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] WebView2 #xpa #dotnet
 
Craig, where should the contents be extracted to?

On Thu, Mar 10, 2022 at 3:09 PM Craig Martin <craig@...> wrote:
Couple of way but easiest is you can right-click and extract the contents.

From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Adrian Wick <adrian.wick2015@...>
Sent: Thursday, March 10, 2022 10:33 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] WebView2 #xpa #dotnet
 
Hm,

how do i install cab file? I must have done something wrong with this ...

regards,
A


Adrian Wick
 

Craig thank you for taking the time to help me!

1st i found out that i get 2 different "extractions". I have winrar installed and by default the .cab file was opened with this program.
If i extract using this program, i get this content with directories!


than i did the same with windows explorer:


i get 2 totaly different results ... and not in single one of those two extractions are there files which are in your project CRR:
- Microsoft.Web.dll
- Microsoft.Web.WebView2.Core.dll
- Microsoft.Web.WebView2.WinForms.dll

I found last two on github. But i cant find 1st one Microsoft.Web.dll ...

Regards,
A


Adrian Wick
 

Does anyone know where to get Microsoft.Web.dll?

So here are the steps i did:
1. installed visual studio 2019 (i don't think this was a mandatory step, but i did it anyway)
2. installed edge (the evergreen bootstrap and evergreen stand alone; i also downloaded the fixed version, extracted it into a folder ... i don't know what else to do with the extracted files)
3. installed edge canary (https://www.microsoftedgeinsider.com/en-us/download)
4. downloaded the webview2 from github and nuget ...

and when i run the webview2 xpa sample i still get errors in components sections. so i manually search for dlls ... i find each dll except for the microsoft.web.dll file and when i run the application
i get error that assembly microsoft.web.dll could not be found or loaded ...

regards
A


Adrian Wick
 

Oh boy ... I FINALLY DID IT!

This is all you need guys:





Now I can go have a beer.

Happy holidays everyone!

Regards
A