[Desktop] Could not load file or assembly Uno.Extensions.Authentication.MSAL.WinUI
Current behavior
When adding AuthenticationMsal to <UnoFeatures> and launching on Desktop an exception is thrown:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Uno.Extensions.Authentication.MSAL.WinUI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'
Expected behavior
No response
How to reproduce it (as minimally and precisely as possible)
Repro: msal.zip Binlog: msal_Debug_AnyCPU_Build_2024-04-24T13_41_23.9873602+01_00.zip
Workaround
No response
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
Uno.Templates 5.2.28
{
"msbuild-sdks": {
"Uno.Sdk": "5.2.83"
}
}
<UnoExtensionsVersion>4.1.14</UnoExtensionsVersion>
<UnoToolkitVersion>6.0.18</UnoToolkitVersion>
<UnoThemesVersion>5.0.13</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.2.13</UnoCSharpMarkupVersion>
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
@dansiegel @nickrandolph what package could be missing?
Currently would be unsupported. We need to look more into this. Technically it could be supported on Windows but Linux wouldn't be and Mac may or may not be supported now by MSAL, we need to see if they ever added support.
Currently would be unsupported. We need to look more into this. Technically it could be supported on Windows but Linux wouldn't be and Mac may or may not be supported now by MSAL, we need to see if they ever added support.
@dansiegel, @jeromelaban So what we will be doing short term here, please? As it is impacting the ToDo sample migration at the moment (https://github.com/unoplatform/Uno.Samples/pull/647) (cc @eriklimakc, @kazo0)
Short term we could either just remove the -desktop target or conditionally include it when building on Windows and remove the WSL profile.
<!-- Conditionally include -desktop when building on Windows -->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
And remove: https://github.com/unoplatform/uno.templates/blob/1c6e0388ab135d4adc119766f78c82d620f827a0/src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Properties/launchSettings.json#L52-L57