With the latest Auth0.OicdClient.MAUI (1.1.0) version, the Auth0.OidcClient.Platforms namespace seems to be gone.
Without it, the redirection activation check does no longer compile.
This test from the docs/examples, within the MyApp.WinUI workspace, is no longer possible to perform:
public App()
{
if (Auth0.OidcClient.Platforms.Windows.Activator.Default.CheckRedirectionActivation())
return;
this.InitializeComponent();
}
Anyone managed to resolve this now? I am on .NET 9.
Hi @dag.baardsen
Welcome to the Auth0 Community!
As far as I have checked, the Auth0.OidcClient.Platforms
is still available and you should be able to run your App component. The SDK and packages are compatible with .NET 9.
I would advise you to reinstall the packages and check the configuration you have inside your application.
I will continue to investigate the issue on my end. Please let me know if you have any updates on the matter.
Kind Regards,
Nik
Thanks. I created a sample app using the VS2022 template for Blazor MAUI Hybrid app, updated all nuget packages in the solution and added the “Auth0.OidcClient.MAUI” nuget package (latest versjon) in the “Myapp.Shared” project. After that, I expanded the App() constructor of the MauiWinUIApplication derived class with a test using the code from my sample above, but the Platforms definition of the Auth0.OidcClient class is still missing.
|Error (active)|CS0234|The type or namespace name ‘Platforms’ does not exist in the namespace ‘Auth0.OidcClient’ (are you missing an assembly reference?)|MauiApp6 (net9.0-windows10.0.19041.0)|D:\dev\annet\MauiApp6\MauiApp6\MauiApp6\Platforms\Windows\App.xaml.cs|19||
Hi again @dag.baardsen
Thank you for sharing that information with me, I am sorry about the delayed response.
As far as I have investigated in relation to the issue at hand, it appears to be somewhat of a bug inside the framework where an update might have caused something to change and not work anymore.
I would advise you to review the following posts:
If you have any other questions, feel free to leave a reply.
Kind Regards,
Nik
Thanks, but none of these were relevant.
I finally solved the issue by changing the Windows target framework to windows10.0.20348.0:
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.20348.0</TargetFrameworks>
from
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
Thank you for sharing your solution with the community!
Kind Regards,
Nik