From 0cc3f96e413e1d300419b8e9e1466403bf002824 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 22 Jan 2024 08:41:31 -0600 Subject: [PATCH] [Xamarin.Android.Build.Tasks] fix net7.0 "out of support" message When .NET 9 ships, the .NET 7 Android workload will be out of support. We already have this behavior setup, but unfortunately the error message is wrong: Microsoft.NET.EolTargetFrameworks.targets(38,5): error NETSDK1202: The workload 'net6.0-android' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy. [MauiTest.csproj::TargetFramework=net7.0-android] It says `net6.0-android`! In a48a9c56, we hardcoded `net6.0` to align with the iOS team, but we can use the `$(TargetFrameworkVersion)` property (removing `v`) so we don't have to update this line every year. I updated a test for this scenario. --- .../Microsoft.Android.Sdk/Sdk/Eol.targets | 2 +- .../Tests/Xamarin.Android.Build.Tests/InvalidConfigTests.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/Eol.targets b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/Eol.targets index 3789466a1a0..33eeae23a77 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/Eol.targets +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/Eol.targets @@ -28,7 +28,7 @@ Things to note: - +