You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Xamarin.Android9.0 target should be chosen over netstandard2.0 target by Android test project #236
When I have a multi-targeting library that offers netstandard2.0 and Xamarin.Android9.0 targets, and I reference that from a Xunit Devices Android project, I expect the Xamarin.Android9.0 target to be used by the android app since it's platform specific, which should be preferred, I think.
But in the attached minimal repro we see the test fails because the netstandard2.0 build of the library is selected.
Switching the TFM from Xamarin.Android9.0 to MonoAndroid9 solves both problems. If that's the supported way, why is Xamarin.Android listed in the README instead of monoandroid?
I wonder. The documented list of TFMs (if you scroll down far enough) include a table that lists monoandroid and xamarinios. It does not list the two that your README lists. So NuGet is acting consistently with the MS published docs as far as I can tell. Which begs the question: where did you get the Xamarin.iOS and Xamarin.Android TFMs that you're using?
What do you think about updating your README to reflect what currently works today, and we can pursue filing bugs against nuget to either honor the doc you linked to, or to correct the doc to reflect today's behavior?
Activity
AArnott commentedon Aug 15, 2020
I also notice that packing the multi-targeting library fails with:
AArnott commentedon Aug 15, 2020
Switching the TFM from
Xamarin.Android9.0toMonoAndroid9solves both problems. If that's the supported way, why isXamarin.Androidlisted in the README instead ofmonoandroid?AArnott commentedon Aug 15, 2020
I have the same problem with iOS.
Xamarin.iOSdidn't get picked up by the iOS project. Butxamariniosdid (no period).clairernovotny commentedon Aug 16, 2020
This seems like a NuGet bug. The extras has nothing to do with TFM selection.
AArnott commentedon Aug 16, 2020
I wonder. The documented list of TFMs (if you scroll down far enough) include a table that lists
monoandroidandxamarinios. It does not list the two that your README lists. So NuGet is acting consistently with the MS published docs as far as I can tell. Which begs the question: where did you get theXamarin.iOSandXamarin.AndroidTFMs that you're using?clairernovotny commentedon Aug 16, 2020
Xamarin.iOS comes from https://docs.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/nuget-manual#nuget-package-xamarin-profiles
I don't remember where I saw Xamarin.Android.
AArnott commentedon Aug 16, 2020
What do you think about updating your README to reflect what currently works today, and we can pursue filing bugs against nuget to either honor the doc you linked to, or to correct the doc to reflect today's behavior?