Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[One .NET] remove NuGet workarounds #5973

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

jonathanpeppers
Copy link
Member

Fixes: #5896

Since early in .NET 5 development, we had workarounds (hacks?) for
enabling the legacy Xamarin.Forms NuGet package to work correctly. We
used $(PackageTargetFallback) so that monoandroid assemblies would
be used in NuGet packages. We also had to fix up item groups manually
so monoandroid could be chosen over netstandard.

We should be able to remove these workarounds, since we now have a
dotnet/installer with this change:

NuGet/NuGet.Client@1027428

@jonathanpeppers
Copy link
Member Author

I don't think this will actually work yet, I get errors building HelloAndroid:

HelloAndroid.csproj : error NU1202: Package Xamarin.AndroidX.Migration 1.0.8 is not compatible with net6.0-android30.0 (.NETCoreApp,Version=v6.0). Package Xamarin.AndroidX.Migration 1.0.8 supports: monoandroid90 (MonoAndroid,Version=v9.0)

@jonathanpeppers
Copy link
Member Author

This is mostly green, but new .so files are showing up:

349,816 lib/arm64-v8a/libmono-component-diagnostics_tracing.so *2
167,608 lib/arm64-v8a/libmono-component-hot_reload.so *2

Are we supposed to do something that excludes these? Question for next week.

@jonathanpeppers
Copy link
Member Author

I'm going to wait on: #5977

Then come back to this.

Fixes: dotnet#5896

Since early in .NET 5 development, we had workarounds (hacks?) for
enabling the legacy Xamarin.Forms NuGet package to work correctly. We
used `$(PackageTargetFallback)` so that `monoandroid` assemblies would
be used in NuGet packages. We also had to fix up item groups manually
so `monoandroid` could be chosen over `netstandard`.

We should be able to remove these workarounds, since we now have a
dotnet/installer with this change:

NuGet/NuGet.Client@1027428
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 3, 2021 03:14
@jonathanpeppers
Copy link
Member Author

Only error I'm seeing in the latest run:

[BT : 1.4.0] error : Error retrieving device SDK version. Please try again. [/Users/runner/work/1/s/bin/TestRelease/temp/TestAndroidStoreKeyTrueTrueaabTrueandroid_ks test.keystoreTrue/UnnamedProject.csproj]
                     /Users/runner/Library/Android/dotnet/packs/Microsoft.Android.Sdk.Darwin/30.0.100-ci.pr.gh5973.27/tools/Xamarin.Android.Common.targets(2526,3): error : java.lang.IllegalStateException :  Error retrieving device SDK version. Please try again.

I think it is unrelated.

@jonathanpeppers jonathanpeppers merged commit ca51adb into dotnet:main Jun 4, 2021
@jonathanpeppers jonathanpeppers deleted the remove-nuget-hacks branch June 4, 2021 13:04
jonathanpeppers added a commit that referenced this pull request Jun 4, 2021
Fixes: #5896

Since early in .NET 5 development, we had workarounds (hacks?) for
enabling the legacy Xamarin.Forms NuGet package to work correctly. We
used `$(PackageTargetFallback)` so that `monoandroid` assemblies would
be used in NuGet packages. We also had to fix up item groups manually
so `monoandroid` could be chosen over `netstandard`.

We should be able to remove these workarounds, since we now have a
dotnet/installer with this change:

NuGet/NuGet.Client@1027428
jonathanpeppers added a commit that referenced this pull request Jun 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants