CommunityToolkit / Maui.NativeLibraryInterop

Maui.NativeLibraryInterop is a community-created library of binding samples to help .NET MAUI developers interop with native libraries more easily
MIT License
179 stars 28 forks source link

Find better BeforeTargets for Common.*.targets #2

Closed Redth closed 4 months ago

Redth commented 7 months ago

Currently using a target that causes the BuildXCFramework and BuildAar targets to run too often (including in a nuget restore build pass).

Need to look for a better target to use for each platform. There is something like CollectNativeReferences on iOS and _ResolveAars on Android (which they inject into CoreResolveReferencesDependsOn)

pjcollins commented 6 months ago

This should be slightly improved by https://github.com/Redth/DotNet.Platform.SlimBindings/pull/15 via:

https://github.com/Redth/DotNet.Platform.SlimBindings/pull/15/files#diff-236b52437f49e99579d42ec96e008395e33c185e8d331efe41b985b9310e0890R25

https://github.com/Redth/DotNet.Platform.SlimBindings/pull/15/files#diff-cb7e40267b52d3998ef1e84c108fb5189594d1151d694001c550a223538a2d02R40-R46

Though I will be revisiting this when introducing MSBuild tasks, as this doesn't work perfectly with projects that multitarget ios/mac.

pjcollins commented 4 months ago

Fixes for multitargeting landed in https://github.com/Redth/DotNet.Platform.SlimBindings/pull/22, going to close this as fixed.