microsoft-authentication-library-for-dotnet icon indicating copy to clipboard operation
microsoft-authentication-library-for-dotnet copied to clipboard

[Do Not Merge] Bump up the WebView2 package version

Open DharshanBJ opened this issue 9 months ago • 6 comments

The Microsoft.Identity.Client.Desktop package relies on an older version of the Microsoft.Web.WebView2 library (version 1.0.864.35, released on June 1st, 2021). However, the DLL structure has changed between version 1.0.864.35 and the latest versions of the WebView2 package. Specifically, version 1.0.864.35 uses the Microsoft.Web.WebView2.Core dll, while the newer versions have Microsoft.Web.WebView2.Core.Projection dll.

Please see internals of packages

https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.864.35#versions-body-tab https://nuget.info/packages/Microsoft.Web.WebView2/1.0.864.35 https://nuget.info/packages/Microsoft.Web.WebView2/1.0.2903.40

This change in the DLL structure likely leads to a binary/API incompatibility between the older version of WebView2 and Maui 9, resulting in the following exception when users upgrade to Maui 9:

"Could not load file or assembly 'Microsoft.Web.WebView2.Core, Version=1.0.864.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e'. The system cannot find the file specified."

I was able to reproduce this issue in a sample app from one of the users who reported it. The problem is resolved by updating the WebView2 version in Directory.Packages.props to a newer version that uses the updated DLL structure.

Fixes https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4933

DharshanBJ avatar Feb 26 '25 00:02 DharshanBJ

@DharshanBJ please add a bug, and the reason to bump the version

gladjohn avatar Feb 26 '25 01:02 gladjohn

@DharshanBJ please add a bug, and the reason to bump the version

Updated the PR description with the reasoning for this fix and shared a link to the github issue.

DharshanBJ avatar Feb 26 '25 17:02 DharshanBJ

LGTM, pls close all the comments and merge.

bgavrilMS avatar Feb 27 '25 16:02 bgavrilMS

@DharshanBJ - we are aiming for a release today. I would merge this for you, but the title says otherwise. If you want to catch this release, pls merge.

bgavrilMS avatar Feb 28 '25 11:02 bgavrilMS

@DharshanBJ - we are aiming for a release today. I would merge this for you, but the title says otherwise. If you want to catch this release, pls merge.

@bgavrilMS , i was running into some issues when i tested this on the older dotnet versions. So i'll run a few more tests to ensure this change won't regress anything.

DharshanBJ avatar Feb 28 '25 16:02 DharshanBJ

added the do not merge label

gladjohn avatar Feb 28 '25 16:02 gladjohn

Hi @DharshanBJ - can you please merge this PR or close it if it is not relevant?

bgavrilMS avatar Jun 20 '25 12:06 bgavrilMS

Hi @DharshanBJ - can you please merge this PR or close it if it is not relevant? Hi @bgavrilMS , closing this, as its not longer relevant.

DharshanBJ avatar Jun 20 '25 17:06 DharshanBJ