Trouble deploying WebView2 app for use with Evergreen runtime #4754
Replies: 1 comment 5 replies
-
My application is totally different but there are similarities. I am using HoloLens 2 which has WebView2 installed as part of the Windows Update, the Evergreen it seems even though MS does not make it clear how to use it. I too have to package (manually) the Microsoft.Web.WebView2.Core.dll file in my package and I have to include in the package the WebView2Loader.dll. |
Beta Was this translation helpful? Give feedback.
-
Having tried it seems just about everything without success, I'm hoping for some insights on this subject. I'm attempting to deploy on a server a WebView2 app that will be used by many users. The Fixed Version of the runtime appears to support only a single user, so I'm attempting to configure this for use with the Evergreen WebView2 runtime. I've installed the Microsoft.Web.WebView2 version 1.0.2651.64 Nuget package. The package creates the following DLLs: Microsoft.Web.WebView2.Core, Microsoft.Web.WebView2.WinForms, Microsoft.Web.WebView2.Wpf. It also creates the WebView2Loader.dll in three platform-specific folders.
According to the documentation, the WebView2 runtime is not packaged with the app. Since I need the installed WebView2 Nuget to code against the APIs and yet I needed to prevent the Fixed Version runtime from being packaged with the app, I updated references for the three DLLs, specifying "False" for "Copy Local" and "Specific Version". I also deleted the WebView2Loader DLLs.
Testing this on my local PC, which has the Evergreen runtime installed, generates an error message stating that it is unable to load the 1.0.2651.64 version of the Microsoft.Web.WebView2.WinForms.dll. Since the version shown on the error message matches the version of WebView2 installed, I assume it's trying to load a DLL that wasn't copied to the bin folder.
I do see that the CoreWebView2Environment has the SetLoaderDllFolderPath that allows for the specification of a folder where supposedly another WebView2Loader DLL exists. I've not tried that because it's not clear looking at the folder where the Evergreen EdgeWebView2 appears to have been installed what folder to specify -- I don't see the presence of any of the DLLs mentioned above.
I suspect the answer in retrospect will appear somewhat obvious and maybe just boil down to some specific thing I missed or misunderstood in the documentation. Thank you in advance for any help you can provide.
Jim Gibson
Beta Was this translation helpful? Give feedback.
All reactions