-
Notifications
You must be signed in to change notification settings - Fork 344
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
[Bug] [S] WebView2Loader.dll is missing in net472 app #2482
Comments
I was not able to reproduce this issue. @pmaytak - could you try to create a simple repro and open a bug on WebView2 team ? Should be sufficient to just try string s = CoreWebView2Environment.GetAvailableBrowserVersionString();
Console.WriteLine(s); |
@bgavrilMS Added zip repro above. |
@bgavrilMS It's an issue with WebView2 SDK. Possible bug and workaround is described here. Workaround is to add The explanation is pretty long but worth a read. Basically WebView2 SDK fails to build different WebView2Loader.dll version for different targets (since it's a native DLL) when the |
Nice, thanks for following this up @pmaytak ! |
@bgavrilMS Adding PlatformTarget element workaround doesn't work for us. Should we exclude WebView2 here for NetFx targets? Lines 46 to 50 in c25582a
NetDesktopWinFormsWAM still doesn't include the WebView2Loader.dll. NetCoreWinFormsWAM does include the different WebView2Loader.dll runtimes. Also for reference: Release notes for WebView2 SDK. |
We should think about catching the exception and re-thrwoing a meaningful error with the workaround, |
Update: Seems like the workaround doesn't work when the library is consumed as a NuGet. Left comment in the WebView2 feedback issue. |
cc @bgavrilMS @mjcheetham |
@pmaytak do we want to document this in the wiki? |
@jmprieur We do have it in a wiki: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/WebView2#troubleshooting. But thanks, for the reminder, I'll update it. |
Closing as no fix. For AAD authorities, please use WAM. |
Which Version of MSAL are you using ?
4.33
Platform
net472
What authentication flow has the issue?
Interactive WebView2
Repro 1
WebView2LoaderRepro.zip
Repro 2
Expected behavior
WebView2 should show up.
Actual behavior
If App targets net472, I see different behavior depending on the PlatformTarget element in the App csproj.
Additional context / logs / screenshots
Current workaround is to set
PlatformTarget
to either x86 or x64 in the app's project file.Related issue in WebView2 repo:
Using WebView2 in a WPF Assembly
The text was updated successfully, but these errors were encountered: