You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] PackageReference to Microsoft.Web.WebView2 in project causes CoreWebView2 name collision when used with Microsoft.WinUI library in WinUI app
#4915
Open
matthewacme opened this issue
Sep 3, 2024
· 4 comments
The app is in production, and I have upgraded to a new version of MSAL
Issue description and reproduction steps
Upgrading to the latest version of the Microsoft.IdentityClient and Microsoft.Identity.Client.Extensions.Msal (version 4.64.0 for both libraries) in a WinUI app built on the Microsoft.WindowsAppSDK 1.5.240802000 causes the following error on Compile.
error CS0433: The type 'CoreWebView2' exists in both 'Microsoft.Web.WebView2.Core.Projection, Version=1.0.2739.15, Culture=neutral, PublicKeyToken=2a8ab48044d2601e' and 'Microsoft.WinUI, Version=3.0.0.0, Culture=neutral, PublicKeyToken=de31ebe4ad15742b'
downgrade to the previous build and the error goes away. My project doesn't have a reference to the Microsoft.Web.WebView2.Core.Projection library, so this reference is getting brought in by MSAL.
upgrading to the latest library would not break my WinUI app
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
worked in 4.63.0
Solution and workarounds
I've tried everything I can to hide the reference you have added from my projects compile. Until the differing folks and teams at Microsoft can agree on exactly WHERE the WebView2 name spaces are going to live, maybe you could alias it in your project?
The text was updated successfully, but these errors were encountered:
Allows me to currently USE B2C / external ID, that is we are able to currently allow our users to create and use MSAL to set up B2C registration / login / identity with our AD system.
As soon as I attempt update the Microsoft.Identity.Client to 4.64.0 (from 4.63.0) I get the compile error. Upgrading the other references does not "fix" the issue.
@charlesroddie
Unfortunately it is not possible to upgrade to the WinAppSDK 1.6. I tried that about 2 weeks ago, and the bugs that upgrade introduced were so extensive that our app would not run.
I filed various bugs with the WinAppSDK team in regards to the issues that were raised with an attempt to upgrade to 1.6.
I'm going to have to wait until at least their next release / bug fix for 1.6 before I can upgrade
Library version used
4.64.0
.NET version
Microsoft.WindowsAppSDK 1.5.240802000
net8.0-windows10.0.22621.0
Scenario
PublicClient - desktop app
Is this a new or an existing app?
The app is in production, and I have upgraded to a new version of MSAL
Issue description and reproduction steps
Upgrading to the latest version of the Microsoft.IdentityClient and Microsoft.Identity.Client.Extensions.Msal (version 4.64.0 for both libraries) in a WinUI app built on the Microsoft.WindowsAppSDK 1.5.240802000 causes the following error on Compile.
downgrade to the previous build and the error goes away. My project doesn't have a reference to the
Microsoft.Web.WebView2.Core.Projection
library, so this reference is getting brought in by MSAL.see the source in GitHub for the .csproj
Relevant code snippets
No response
Expected behavior
upgrading to the latest library would not break my WinUI app
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
worked in 4.63.0
Solution and workarounds
I've tried everything I can to hide the reference you have added from my projects compile. Until the differing folks and teams at Microsoft can agree on exactly WHERE the WebView2 name spaces are going to live, maybe you could alias it in your project?
The text was updated successfully, but these errors were encountered: