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 in net472 app #1091

Closed
pmaytak opened this issue Mar 18, 2021 · 2 comments
Closed

WebView2Loader.dll is missing in net472 app #1091

pmaytak opened this issue Mar 18, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pmaytak
Copy link

pmaytak commented Mar 18, 2021

Description
Scenario (on net472): Library project (ex. WebView2LoaderLibrary) references WebView2 code. App project (ex. WebView2LoaderRepro) references the library project as a DLL or NuGet package. Exception is thrown when WebView2Loader.dll cannot be loaded.

When the library project is referenced as a project, included in solution, everything works. WebView2Loader.dll is included in the /bin/(x86/x64) folders. Similarly works for Net Core and Net5 apps; WebView2Loader.dll is included in /runtimes/win-x86/native folder.

Version
SDK: Microsoft.Web.WebView2.1.0.824-prerelease
Runtime: 89.0.774.54 (Installed via Edge Beta)
Framework: net472
OS: Win 10 Enterprise, 20H2, 19042.867

Repro Steps
WebView2LoaderRepro.zip

  1. Run WebView2LoaderRepro console app. It references WebView2LoaderLibrary as a DLL reference, not a project reference.
  2. 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.GetAvailableCoreWebView2BrowserVersionString(String browserExecutableFolder, String& versionInfo)
at Microsoft.Web.WebView2.Core.CoreWebView2Environment.GetAvailableBrowserVersionString(String browserExecutableFolder)
at WebView2LoaderLibrary.WebView2Helper.GetWebView2Version() in C:\\repos\\WebView2LoaderRepro\\WebView2LoaderLibrary\\WebView2Helper.cs:line 7
at WebView2LoaderRepro.Program.Main(String[] args) in C:\\repos\\WebView2LoaderRepro\\WebView2LoaderRepro\\Program.cs:line 13
@champnic
Copy link
Member

@pmaytak Thanks for the bug report! Can you see if the info/discussion in #730 is helpful? It seems like it might be the same issue. If it's not, please let me know and I can reopen this issue separately.

@pmaytak
Copy link
Author

pmaytak commented Mar 31, 2021

@champnic Thanks, yes, that issue looks the same. We'll try workaround that was mentioned.

cc @bgavrilMS

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

2 participants