-
Notifications
You must be signed in to change notification settings - Fork 54
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
Crash on .NET Framework 4.7.2 #1418
Comments
I think that I've discovered the concrete circumstances which cause this bug: it occurs when you use an SDK-style csproj to target net472 (or probably any other version of .NET Framework). Using an SDK-style csproj to target netcoreapp* (i.e. .NET Core) works fine, and using an old-style csproj to target net* (i.e. .NET Framework) works fine. To summarize, using WebView2 in:
Once you're in the specific case that causes this bug, the way that it manifests actually depends on a few more factors: the If your app depends directly on the WebView2 SDK NuGet package, then here are the possible outcomes based on the
If your app depends indirectly on WebView2 (i.e. your app depends on some other NuGet package which in turn depends on WebView2), then here are the possible outcomes based on the
Basically the difference between your app depending on WebView2 directly vs indirectly is that in the direct case WebView2 creates various If you're in the case of indirectly depending on WebView2 then I don't yet have any appealing workarounds to suggest. Unappealing possibilities include switching to an old-style csproj for targeting .NET Framework or hacking together some post-build logic to grab the correct DLL or runtime folder(s) out of the WebView2 NuGet package. Lastly, one more unexpected thing that I discovered while investigating this, and could end up being fixed at the same time, is that in the case of an SDK-style csproj targeting netcoreapp, WebView2 always creates all supported |
I would like to add (in case this is not known) that the property that usually determines what (native) DLLs are copied to the output for SDK style projects is the
This all happens by default for SDK style projects, so there should be no need for manually copying DLLs to the output folder as it is currently done in the |
Description
According to the page https://docs.microsoft.com/en-us/microsoft-edge/webview2/ WebView2 should run from .NET Framework 4.5. However, the example (https://github.com/MicrosoftEdge/WebView2Samples/tree/master/GettingStartedGuides/WPF_GettingStarted) does not work with the current version of WebView2 on net472. The last version it works with is 1.0.705.50.
Version
SDK: 1.0.864.35
Runtime: 91.0.864.48
Framework: WPF (net472)
OS: Win10
Repro Steps
AB#36226098
The text was updated successfully, but these errors were encountered: