Azure-Samples / Azure-Samples/ms-identity-ciam-dotnet-tutorial
upgrade .net maui to .net9 and get error 'Could not load file or assembly 'Microsoft.Web.WebView2.Core, Version=1.0.864.35' with Windows Machine
- Dominant language
- PowerShell
- Stars
- 48
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
First of all, the current repo uses .net 7 which cannot run any more on my visual studio 2022. So I upgraded the maui project to .net 9 and then run it with Windows Machine. I run into the error "Could not load file or assembly 'Microsoft.Web.WebView2.Core, Version=1.0.864.35" at `PublicClientApplication.AcquireTokenInteractive(scopes)
.WithParentActivityOrWindow(PlatformConfig.Instance.ParentWindow)
.ExecuteAsync()
.ConfigureAwait(false)`
in MSALClientHelper.cs.
This assembly is a transitive package used by Microsoft.Identity.Client.Desktop and it has the version 1.0.2792.45, which is higher than what Microsoft.Identity.Client.Desktop requires (>=1.0.864.35). After build I also checked the bin\Debug\net9.0-windows10.0.19041.0\win10-x64 and verified that this assembly Microsoft.Web.WebView2.Core.dll with version 1.0.2782.45 is copied there.
I tried to fix this issue with adding `` to the sign-in-maui-csproj file but that doesn't help.
Please help me!

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.