Open vsfeedback opened 5 days ago
@codendone is this error something you've encountered before?
From the logs, it looks like you are using an older WebView2 SDK Microsoft.Web.WebView2.Wpf, Version=1.0.2592.51
. Can you please try with the latest SDKs https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.2895-prerelease OR https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.2849.39
The example project does not have a direct reference to the Microsoft.Web.Webview2
. But it is referenced by both packages Microsoft.AspNetCore.Components.WebView.WPF
and Microsoft.WindowsAppSDK
in version 1.0.2651.64
If I manually add the latest 1.0.2849.39
(or latest prerelease 1.0.2895-prerelease
) version to the project, I get the exact same Exception saying it is missing the "older" version 1.0.2592.51
of the Webview package:
Could not load file or assembly 'Microsoft.Web.WebView2.Wpf, Version=1.0.2592.51, Culture=neutral, PublicKeyToken=2a8ab48044d2601e'. The system cannot find the file specified.
This issue has been moved from a ticket on Developer Community.
[severity:I’m unable to use this version]
We are developing an WPF Blazor Hybrid app. The app also makes use of various features provided by the WindowsAppSDK library. Since we updated the WindowsAppSDK to version 1.6 the BlazorWebView cannot be instantiated anymore due to the following runtime exception:
The following two NuGet packages that we are using seem to be causing this conflict:
The following findings where the result of our own investigation of the problem:
We noticed that the VisualStudio update also has an influence. With version 17.10 the project with the lastest versions of the libraries could not be compiled and raised the compilation error:
Updating to 17.11 fixed the compilation error but the runtime error remained. With VisualStudio Version 17.10, adding the WindowsSdkPackageVersion tag in the project file as states in the compiler error message allowed for successful compilation but the runtime error remains.
The problem can be reproduced by the following steps:
Attached is a premade sample project to reproduce the problem:
BlazorWpf1.zip
Original Comments
Feedback Bot on 10/29/2024, 07:48 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.