chore: Add target for MSAL when target is wasm

This commit is contained in:
eriklimakc 2024-06-13 16:09:58 +01:00
Родитель f2869926b3
Коммит 3569e11f52
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -36,4 +36,16 @@
</ItemGroup>
<Message Importance="high" Text ="Removed: @(_WebView2CoreOutputsToExclude)" />
</Target>
<Target Name="_ValidateMsalDependencyWasm"
BeforeTargets="Compile"
Condition="'$(IsUnoHead)'=='true' and '$(UnoRuntimeIdentifier)'=='WebAssembly'">
<ItemGroup>
<_ClientRefs Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' == 'Microsoft.Identity.Client'" />
<_MsalRefs Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' == 'Microsoft.Identity.Client.Extensions.Msal'" />
</ItemGroup>
<Error Condition="'@(_ClientRefs)'==''" Text="In order to use Uno.Extensions.Authentication.MSAL, the 'Microsoft.Identity.Client' NuGet Package must be referenced in the project." />
<Error Condition="'@(_MsalRefs)'==''" Text="In order to use Uno.Extensions.Authentication.MSAL, the 'Microsoft.Identity.Client.Extensions.Msal' NuGet Package must be referenced in the project." />
</Target>
</Project>