Skip to content
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

WebView2Loader.dll is missing from the Installer Folder. #1121

Closed
Gopal-23 opened this issue Mar 26, 2021 · 4 comments
Closed

WebView2Loader.dll is missing from the Installer Folder. #1121

Gopal-23 opened this issue Mar 26, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Gopal-23
Copy link

I am using Microsoft.Web.WebView2.1.0.790-prerelease NuGet package in my WPF application which is targeting the .NET 4.6.2 Framework.
Getting this exception when packaging the app:
Initializing Error:System.DllNotFoundException: Unable to load DLL 'WebView2Loader.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2EnvironmentWithOptions(String browserExecutableFolder, String userDataFolder, ICoreWebView2EnvironmentOptions options, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environment_created_handler)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Windstream.Desktop.WeConnect.Views.LogInPage.d__20.MoveNext()

@champnic champnic added the bug Something isn't working label Mar 30, 2021
@champnic
Copy link
Member

Hey @Gopal-23 - thanks for the report. Could you add some detail around how you are packaging and deploying your app?

@champnic champnic self-assigned this Mar 30, 2021
@RickStrahl
Copy link

Perhaps this is related to #1133?

@Gopal-23
Copy link
Author

Gopal-23 commented Apr 1, 2021

Hey @Gopal-23 - thanks for the report. Could you add some detail around how you are packaging and deploying your app?

Hey @champnic,
Now working,
Like I manually added this into my Wix MSI packing:

 <Component Id="WebView2Loader" Guid="xxx.xxx">
		<File Source="$(var.TargetDir)\runtimes\win-x86\native\WebView2Loader.dll"/>				
</Component>

So just to know, when we run our app with VS 2019 it automatically adds the runtime folder into the Bin>Release Folder, so why not in the WIX installer. And also there is no proper guidance in the DOC of Packaging related to WIX Installer.

@champnic
Copy link
Member

champnic commented Apr 1, 2021

Glad it's working for you now. Yes that file needs to be deployed with the app. I'm not sure why VS automatically adds the folder but WiX doesn't. We have samples of WiX deployment in our sample repo: https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps

@DavidShoe Do we have docs describing how to do this? Maybe we should link to the samples from the "Distributing your app" doc. And do you know if WiX should be picking up the dependencies itself automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants