Skip to content

Commit

Permalink
[workloads] Don't load mono librarymode targets if PublishAot is set (#…
Browse files Browse the repository at this point in the history
…103777)

This change removes the incorrect error message when you using NativeAOT library mode
on mobile and you have `<NativeLib>` set. Previously, it would only detect if `<NativeLib>` was
set and error out if you didn't install the library builder workload. That only applies if mono
is your target.
  • Loading branch information
steveisok committed Jun 21, 2024
1 parent f06bc4d commit 65ef110
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''">$(WasmNativeWorkloadAvailable)</UsingBrowserRuntimeWorkload>
</PropertyGroup>

<PropertyGroup Condition="'$(NativeLib)' != ''">
<!-- Mono AOT library mode support -->
<PropertyGroup Condition="'$(PublishAot)' != 'true' and '$(NativeLib)' != ''">
<_IsAndroidLibraryMode Condition="'$(RuntimeIdentifier)' == 'android-arm64' or '$(RuntimeIdentifier)' == 'android-arm' or '$(RuntimeIdentifier)' == 'android-x64' or '$(RuntimeIdentifier)' == 'android-x86'">true</_IsAndroidLibraryMode>
<_IsAppleMobileLibraryMode Condition="'$(RuntimeIdentifier)' == 'ios-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-x64' or '$(RuntimeIdentifier)' == 'maccatalyst-arm64' or '$(RuntimeIdentifier)' == 'maccatalyst-x64' or '$(RuntimeIdentifier)' == 'tvos-arm64'">true</_IsAppleMobileLibraryMode>
<_IsiOSLibraryMode Condition="'$(RuntimeIdentifier)' == 'ios-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-arm64' or '$(RuntimeIdentifier)' == 'iossimulator-x64'">true</_IsiOSLibraryMode>
Expand Down

0 comments on commit 65ef110

Please sign in to comment.