Skip to content

[Xamarin.Android.Build.Tasks] temporarily support .NET 8 in .NET 10 #9777

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

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

jonathanpeppers
Copy link
Member

Context: dotnet/android-libraries#1084 (comment)
Context: https://aka.ms/maui-support-policy

dotnet/android-libraries needs to build with:

<TargetFrameworks>net8.0-android;net10.0-android</TargetFrameworks>

Typically each .NET release, we only support N-1 $(TargetFrameworks) and import Eol.targets to emit an error message on older versions.

We can make some .NET workload changes to support .NET 8 in a .NET 10 SDK until .NET 8 goes out of support in May.

I also updated some MSBuild tests to ensure .NET 8 projects build & run.

Context: dotnet/android-libraries#1084 (comment)
Context: https://aka.ms/maui-support-policy

dotnet/android-libraries needs to build with:

    <TargetFrameworks>net8.0-android;net10.0-android</TargetFrameworks>

Typically each .NET release, we only support N-1 `$(TargetFrameworks)`
and import `Eol.targets` to emit an error message on older versions.

We can make some .NET workload changes to support .NET 8 in a .NET 10
SDK until .NET 8 goes out of support in May.

I also updated some MSBuild tests to ensure .NET 8 projects build & run.
@jonathanpeppers
Copy link
Member Author

The net8.0 tests look to be working now:

image

@jonathanpeppers jonathanpeppers marked this pull request as ready for review February 11, 2025 14:49
@jonathanpeppers jonathanpeppers merged commit aa0485f into main Feb 11, 2025
58 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/net8in10 branch February 11, 2025 16:34
jonathanpeppers added a commit that referenced this pull request Feb 12, 2025
…orkload

Context: #9777

The problem with #9777, is it increases our install size by something
like ~700MB with the following packs:

* Microsoft.Android.Sdk.[platform] x 1 (current platform)
* Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.[RID] x 4 RIDs
* Microsoft.NETCore.App.Runtime.Mono.[RID] x 4 RIDs

Some of .NET MAUI's CI machines are extremely tight on disk space, and
we promptly filled the disk!

Let's move these packs to a new `android-net8` workload, which can be
installed separately.

dotnet/android-libraries could simply install:

    dotnet workload install android-net8

Which would provision both `android` and `android-net8` workloads.
grendello added a commit that referenced this pull request Feb 12, 2025
* main:
  Bump to dotnet/java-interop@57f7bc84 (#9724)
  [XABT] Fix Xamarin.Android.Build.Tasks.sln (#9782)
  [java-runtime, Mono.Android] Use `ApplicationRegistration.Context` (#9779)
  [Xamarin.Android.Build.Tasks] temporarily support .NET 8 in .NET 10 (#9777)
  Bump to dotnet/sdk@c0f88f2416 10.0.100-preview.2.25108.4 (#9775)
  [docs] update dotnetbuilds domain (#9772)
jonathanpeppers added a commit that referenced this pull request Feb 14, 2025
…orkload (#9785)

Context: #9777

The problem with #9777, is it increases our install size by something
like ~700MB with the following packs:

* Microsoft.Android.Sdk.[platform] x 1 (current platform)
* Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.[RID] x 4 RIDs
* Microsoft.NETCore.App.Runtime.Mono.[RID] x 4 RIDs

Some of .NET MAUI's CI machines are extremely tight on disk space, and
we promptly filled the disk!

Let's move these packs to a new `android-net8` workload, which can be
installed separately.

dotnet/android-libraries could simply install:

    dotnet workload install android-net8

Which would provision both `android` and `android-net8` workloads.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants