Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Fixes: #8003

Add a new Eol.targets file to be imported for net6.0-android projects. It contains the necessary/minimal settings to emit the build error:

Microsoft.NET.EolTargetFrameworks.targets(35,5): error NETSDK1202:
The workload '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.

We will probably need the latest .NET SDK to flow to us, in order to write a test. I could only test locally by editing .targets files in the .NET SDK.

Fixes: dotnet#8003

Add a new `Eol.targets` file to be imported for `net6.0-android`
projects. It contains the necessary/minimal settings to emit the build
error:

    Microsoft.NET.EolTargetFrameworks.targets(35,5): error NETSDK1202:
    The workload '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.

We will probably need the latest .NET SDK to flow to us, in order to
write a test. I could only test locally by editing `.targets` files in
the .NET SDK.
@jonathanpeppers
Copy link
Member Author

New test seems OK:

image

@jonathanpeppers jonathanpeppers marked this pull request as ready for review May 25, 2023 13:54
@jonathanpeppers jonathanpeppers requested a review from jonpryor May 25, 2023 13:54
@jonpryor jonpryor merged commit ee90ad9 into dotnet:main May 26, 2023
@jonathanpeppers jonathanpeppers deleted the Eol.targets branch May 26, 2023 14:05
grendello added a commit to grendello/xamarin-android that referenced this pull request May 26, 2023
* main:
  [Xamarin.Android.Build.Tasks] introduce Eol.targets for .NET 6 (dotnet#8047)
  [Xamarin.Android.Build.Tasks] Add $(_BindingsToolsLocation) to allow overriding binding tool binaries. (dotnet#8069)
  [tests] new test for provisioning JDKs (dotnet#8059)
  Localized file check-in by OneLocBuild Task (dotnet#8065)
  [AndroidDependenciesTests] Use platform-tools 34.0.3 (dotnet#8062)
  Bump to xamarin/Java.Interop/main@93c50fe (dotnet#8060)
  [Xamarin.Android.Build.Tasks] Update XA5300 text (dotnet#8057)
@rolfbjarne
Copy link
Member

@jonathanpeppers

The message

The workload 'android' is out of support and will not receive security updates in the future.

doesn't really say that the problem is the "6.0" part, and that the fix is to use .NET 7+ (instead it sounds like we completely dropped support for android)

I'm thinking doing something like this for us:

The workload 'net6.0-ios' is out of support and will not receive security updates in the future.

which IMHO makes it a bit clearer what the problem is.

@jonathanpeppers
Copy link
Member Author

The other message is:

NETSDK1138: The target framework 'net5.0' is out of support and will not receive security updates in the future. Please refer to {1} for more information about the support policy.

So yeah, maybe we do need the version number in there? We would have to ship .NET 6 updates to fix it, though.

@rolfbjarne should we consider a change in the .NET SDK instead?

@rolfbjarne
Copy link
Member

We control the 'android' part here:

https://github.com/jonathanpeppers/xamarin-android/blob/eea3c32bd52856a3f39443cf99783661855edfd7/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/Eol.targets#L31

it's easy enough to change that to 'net6.0-android'.

I think it's clear enough that people will understand what's happening.

That said, we could always create our own error if we want to and show that instead, and there's no need to update older releases.

jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this pull request Aug 28, 2023
Context: dotnet#8047 (comment)

The current error message:

    Microsoft.NET.EolTargetFrameworks.targets(35,5): error NETSDK1202:
    The workload '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.

Doesn't say the problem is .NET 6, it sounds like all versions of the
`android` workload are out of support.

To align with the xamarin-macios team, let's change it to be:

    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.
jonpryor pushed a commit that referenced this pull request Aug 29, 2023
…#8307)

Context: #8047 (comment)

The current error message:

	Microsoft.NET.EolTargetFrameworks.targets(35,5): error NETSDK1202:
	The workload '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.

Doesn't say the problem is .NET 6, it sounds like all versions of the
`android` workload are out of support.

To align with the xamarin-macios team, let's change it to be:

	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.
@bruno-garcia
Copy link
Member

This is currently on the rc1 of .NET 8. Indeed I got confused if Android is dropped, since no version is specified.
Given that .NET 6 is LTS and supported until end of 2024, I don't understand how to deal with this warning (which breaks the build because of WarnAsError

@bruno-garcia
Copy link
Member

Oh I see, net6-android is out of support because MAUI has a different support level? https://dotnet.microsoft.com/en-us/platform/support/policy/maui

this isn't a MAUI project so got me confused

@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 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.

Better error message attempting to target net6.0-android from .NET 8

5 participants