[DO NOT MERGE] TFM net9.0
Dogfooding net9.0 only TFM for AndroidX (AX) bindings.
It is to be determined if and when to merge. Thus DO-NOT-MERGE in title and label + draft status.
Some metadata had to be fixed. And some APIs have changed and this needs some investigation
GPS-FB-MLKit PR is Work in Progress (WIP).
Does this change any of the generated binding API's?
Probably. Not sure yet. There were some Metadata changes.
Describe your contribution
In May support for Xamarin.Classic (monoandroid12) and net6.0 will be dropped and this is recon PR to see what is ahead of the team.
Samples error
DotNetBuild ./samples/dotnet/BuildAllMauiApp.sln / BuildAllMauiApp
MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
Restore complete (17,5s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
BuildAllMauiApp failed with errors (2,9s)
/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.99.0-preview.1.151/tools/Xamarin.Android.Common.targets(579,3): error XA1018: Specified AndroidManifest file does not exist: ./samples/dotnet/BuildAllMauiApp/AndroidManifest.xml. [./samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj]
dotnet build samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj
MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
Restore complete (14,9s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
BuildAllMauiApp failed with errors (1,4s)
/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.99.0-preview.1.151/tools/Xamarin.Android.Common.targets(579,3): error XA1018: Specified AndroidManifest file does not exist: ./samples/dotnet/BuildAllMauiApp/AndroidManifest.xml. [./samples/dotnet/BuildAllMauiApp/BuildAllMauiApp.csproj]
tree samples/dotnet/BuildAllMauiApp/
samples/dotnet/BuildAllMauiApp/
├── App.xaml
├── App.xaml.cs
├── AppShell.xaml
├── AppShell.xaml.cs
├── BuildAllMauiApp.csproj
├── MainPage.xaml
├── MainPage.xaml.cs
├── MauiProgram.cs
├── Platforms
│ ├── Android
│ │ ├── AndroidManifest.xml
│ │ ├── MainActivity.cs
│ │ ├── MainApplication.cs
│ │ └── Resources
│ │ └── values
│ │ └── colors.xml
│ ├── MacCatalyst
│ │ ├── AppDelegate.cs
│ │ ├── Info.plist
│ │ └── Program.cs
│ ├── Tizen
│ │ ├── Main.cs
│ │ └── tizen-manifest.xml
│ ├── Windows
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Package.appxmanifest
│ │ └── app.manifest
│ └── iOS
│ ├── AppDelegate.cs
│ ├── Info.plist
│ └── Program.cs
└── Resources
├── AppIcon
│ ├── appicon.svg
│ └── appiconfg.svg
├── Fonts
│ ├── OpenSans-Regular.ttf
│ └── OpenSans-Semibold.ttf
├── Images
│ └── dotnet_bot.svg
├── Raw
│ └── AboutAssets.txt
├── Splash
│ └── splash.svg
└── Styles
├── Colors.xaml
└── Styles.xaml
16 directories, 33 files
Build error:
./generated/androidx.emoji2.emoji2-emojipicker/androidx.emoji2.emoji2-emojipicker.csproj : error NU1605:
Warning As Error: Detected package downgrade: Xamarin.AndroidX.Emoji2 from 1.5.0.1 to 1.2.0.2. Reference the package directly from the project to select a different version.
Xamarin.AndroidX.Emoji2.EmojiPicker -> Xamarin.AndroidX.AppCompat -> Xamarin.AndroidX.Emoji2 (>= 1.5.0.1)
Xamarin.AndroidX.Emoji2.EmojiPicker -> Xamarin.AndroidX.Emoji2 (>= 1.2.0.2 && < 1.2.1)
In config.json
{
"groupId": "androidx.emoji2",
"artifactId": "emoji2",
"version": "1.2.0",
"nugetVersion": "1.2.0.2",
"nugetId": "Xamarin.AndroidX.Emoji2",
"dependencyOnly": true
},
changing it to fix the NuGet error to
{
"groupId": "androidx.emoji2",
"artifactId": "emoji2",
"version": "1.5.0",
"nugetVersion": "1.5.0.1",
"nugetId": "Xamarin.AndroidX.Emoji2",
"dependencyOnly": true
},
causes binderator error
Dependency errors : 1
1
System.Exception:
Artifact
androidx.emoji2.emoji2-emojipicker:1.5.0
has unknown 'Runtime' dependency
androidx.emoji2.emoji2:[1.2.0]
Either fulfill or exclude this dependency.
An error occurred when executing task 'binderate'.
Error: .NET CLI: Process returned an error (exit code 1).
More investigation:
find ./generated -iname "*.csproj" -exec grep -Hni "1\.2\.0\.2" {} \;
./generated/androidx.emoji2.emoji2-emojipicker/androidx.emoji2.emoji2-emojipicker.csproj:112: <PackageReference Include="Xamarin.AndroidX.Emoji2" Version="[1.2.0.2, 1.2.1)" PrivateAssets="none" />
Workaround (for now)
Exclude runtime dependency:
{
"groupId": "androidx.emoji2",
"artifactId": "emoji2-emojipicker",
"version": "1.5.0",
"nugetVersion": "1.5.0.1",
"nugetId": "Xamarin.AndroidX.Emoji2.EmojiPicker",
"excludedRuntimeDependencies": "androidx.emoji2:emoji2",
"dependencyOnly": false
},
/azp run
Azure Pipelines failed to run 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).