Skip to content

Conversation

@jonathanpeppers
Copy link
Member

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 a48a9c5, 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.

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 a48a9c5, 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.
Copy link
Member Author

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New test looks good:

image

@jonathanpeppers jonathanpeppers marked this pull request as ready for review January 22, 2024 20:57
<ItemGroup>
<SdkSupportedTargetPlatformVersion Include="21.0" />
<EolWorkload Include="net6.0-android" Url="https://aka.ms/maui-support-policy" />
<EolWorkload Include="net$(TargetFrameworkVersion.TrimStart('vV'))-android" Url="https://aka.ms/maui-support-policy" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonpryor jonpryor merged commit cf1418d into dotnet:main Jan 25, 2024
@jonathanpeppers jonathanpeppers deleted the Net9EolMessage branch January 25, 2024 22:04
grendello added a commit that referenced this pull request Jan 25, 2024
* main:
  [Xamarin.Android.Build.Tasks] fix net7.0 "out of support" message (#8660)
  [ci] Use NuGetAuthenticate@1 (#8676)
grendello added a commit that referenced this pull request Jan 26, 2024
* main:
  Bump to dotnet/installer@5680e93cb2 9.0.100-preview.2.24073.12 (#8666)
  $(AndroidPackVersionSuffix)=preview.2; net9 is 34.99.0.preview.2 (#8678)
  [Xamarin.Android.Build.Tasks] fix net7.0 "out of support" message (#8660)
  [ci] Use NuGetAuthenticate@1 (#8676)
@github-actions github-actions bot locked and limited conversation to collaborators Feb 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

Development

Successfully merging this pull request may close these issues.

5 participants