Microsoft.Identity.Client.Desktop
I successfully tested the sample https://github.com/Azure-Samples/ms-identity-dotnetcore-maui/tree/main/MauiAppBasic in .NET MAUI 8.0.
Now I would like to create my own project using the same technique.
To begin with, I created an empty project, then I started loading the required libraries. When I load Microsoft.Identity.Client.Desktop I get an error:
"The target platform must be set to Windows (usually by including '-windows' in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so."
Indeed from document https://learn.microsoft.com/en-us/entra/msal/dotnet/acquiring-tokens/desktop-mobile/wam I learn that MAUI does not support this library; this leads me to two questions:
- How is that the sample compiles and runs without raising that error?
- How can I sort out this issue in my project?
Although my project is targeted to Android, I would like to have the multi-platform capability that in principle MAU offers.