-
Notifications
You must be signed in to change notification settings - Fork 686
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
Identity Client package incompatibility? #5143
Comments
Sorry for the delay, I finally had a chance to continue debugging the application. In the process of prepping a repro project, I finally found the culprit.... the Windows.Identity.Client nuget package (at least v4.31) Apologies for the red herring. I just couldn't quite figure out what was failing and I needed the MSAL library so it wasn't something that was easy to just remove and see what happens. I'm going to mark the issue closed. I think the only follow up would be if we could improve the error handling, so that if it comes down to "can't find a type" also provide the assembly that was asking for the type. The error only ever reported as part of the main project, which contributed to the difficulty debugging. |
Had the same issue when I upgraded my app to 0.8 along with other package updates. |
Ok, if someone is still having issues with this, I'm thinking it should be reopened. @andrewleader What I could track down appeared to be an issue of the MSAL packages including windowing that was not part of what was included in the project reunion packages. I think that might be ok, but it should be made clear what we need to do to work around the issue in the meantime. |
I'm getting this exception as well, but I'm not using Identity client. Build works from VS2022 IDE, but not on the CLI, even using Reunion 0.8.1. Here's the stack trace, from the binlog:
|
Note that in the case of Microsoft.Identity.Client, the library targets |
This worked for me, too. However, I also tried to use the Microsoft.Graph.Auth package and I could not find a way to actually get that to work. It uses a newer version of the Microsoft.Identity.Client package and thus gets the same error. This seems really problematic imo. |
Using a lower version of A better workaround would be to force msbuild / nuget to use MSAL's netcoreapp2.1 version instead of MSAL's net5-windows10.0.17663.0 version. |
I don't believe I've ever seen a way to specify a nuget platform other than the target framework of the project. As far as I know, WinUI3 requires net5, so I don't believe I can change that to netcoreapp2.1. Can you point me to directions to use a specific target platform of nuget without changing the target of the project itself? Also, I tried moving the identity logic to a separate project targeting 2.1, the net 5 project referencing that project still used the net 5 version of the package. |
@RealTommyKlein any ideas on this? |
At least for the |
If I install the nuget Microsoft.Identity.Client 4.36.1 on a WinUi3 Desktop project, the following errors occur: Warning NU1701 Package 'Microsoft.ProjectReunion.InteractiveExperiences 0.8.1' was restored using 'net5.0-windows10.0.19041, .NETCoreApp,Version=v3.1, .NETCoreApp,Version=v3.0, .NETCoreApp,Version=v2.0, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, net6.0-windows10.0.19041, .NETFramework,Version=v4.6.1' instead of the project target framework 'UAP,Version=v10.0.19041'. This package may not be fully compatible with your project. Error NETSDK1082 There was no runtime pack for Microsoft.WindowsDesktop.App.WindowsForms available for the specified RuntimeIdentifier 'win10-arm64'. Environment:
Its not possible to down grade the target framework, because there are dependencies to Ms Toolkit packages... Thanks a lot for working on a solution |
Hey @KusiTec, WinUI 3 Desktop currently doesn't support MSAL, but in version 1.0 of the Windows App SDK we're fixing that bug and you'll be able to use MSAL. We should have a preview of 1.0 out shortly that includes this fix! |
Hi @andrewleader, thanks for answering. I am glad to see forward to the new Windows App SDK.
I hope, in future, when the release preview 1.0 from Windows App SDK is deployed, it is possible to implement the newest releases from MSAL and MsGaph.. |
OOoh I see, its already deployed! Thanks a lot. |
Correct, we just released the first preview of WinAppSDK 1.0 and MSAL now works in WinUI 3 Desktop apps! Please let us know if you run into any problems! |
The errors:
Is still happening if you add PackageReference |
I concur with @ADD-David-Antolin - I've seen this since November 2022's .NET and VisualStudio updates. @andrewleader , if this is a known issue, can you point me to it? If this isn't a known issue, do we need to open one so this gets attention? |
I am working on a WinUI 3 app as part of reunion 0.5.7 (I was able to reproduce using the 0.8 preview as well.)
A blank packaged application will run, however once I build out my app, I start getting errors.
This is the error VS reports:
WMC9999 Cannot find type System.Windows.DependencyObject in module WindowsBase.dll.
A scan of the output says that this is happening in the MarkupCompilePass2 target
Repeated cleans, including closing vs and manually deleting vs/obj/bin folders does not help.
When I try to build from the command line, I get a different error:
I'm assuming there's something I'm referencing that the compiler doesn't like, but isn't bad enough for VS to pick it up earlier. I just don't know where to go from here to find it. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: