-
Notifications
You must be signed in to change notification settings - Fork 526
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
Better error message attempting to target net6.0-android
from .NET 8
#8003
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
Milestone
Comments
jpobst
added
the
Area: App+Library Build
Issues when building Library projects or Application projects.
label
May 1, 2023
Hopefully next week, I'll have some info from the .NET SDK team to introduce something like: We'd have some property like |
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
May 10, 2023
Context: https://aka.ms/maui-support-policy Context: dotnet#8003 To be able to emit a new build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1138: 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 can emit a new item group, such as: <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> Changes in the .NET SDK can be found at: TBD Where a new `_CheckForEolWorkloads` MSBuild target will emit the warning: <Target Name="_CheckForEolWorkloads" AfterTargets="_CheckForUnsupportedNETCoreVersion" Condition="'@(EolWorkload)' != '' and '$(CheckEolWorkloads)' == 'true'"> <NETSdkWarning ResourceName="WorkloadIsEol" FormatArguments="%(EolWorkload.Identity);$([MSBuild]::ValueOrDefault('%(EolWorkload.Url)', 'https://aka.ms/dotnet-core-support'))" /> </Target> This does not fully solve dotnet#8003 as future changes are likely needed in the .NET 8 `android` workload.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
May 10, 2023
Context: https://aka.ms/maui-support-policy Context: dotnet#8003 To be able to emit a new build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1138: 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 can emit a new item group, such as: <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> Changes in the .NET SDK can be found at: TBD Where a new `_CheckForEolWorkloads` MSBuild target will emit the warning: <Target Name="_CheckForEolWorkloads" AfterTargets="_CheckForUnsupportedNETCoreVersion" Condition="'@(EolWorkload)' != '' and '$(CheckEolWorkloads)' == 'true'"> <NETSdkWarning ResourceName="WorkloadIsEol" FormatArguments="%(EolWorkload.Identity);$([MSBuild]::ValueOrDefault('%(EolWorkload.Url)', 'https://aka.ms/dotnet-core-support'))" /> </Target> This does not fully solve dotnet#8003 as future changes are likely needed in the .NET 8 `android` workload.
jonpryor
pushed a commit
that referenced
this issue
May 16, 2023
Context: https://aka.ms/maui-support-policy Context: #8003 Context: dotnet/sdk#32426 .NET Android is part of .NET MAUI, and the support policy for .NET MAUI is: > A major version of .NET MAUI receives support for a minimum of 6 > months after a successor (the next major release) ships. We are now (roughly) at the "6 months after a successor ships" window: [.NET MAUI for .NET 7.0 was released 2022-Nov-8][0], meaning support for .NET MAUI for .NET 6.0 ends May 2023, i.e. "now". dotnet/sdk#32426 adds support for an optional workload to specify that it is no longer supported by adding an item to the `@(EolWorkload)` item group: <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> This will cause `dotnet build` to issue a new NETSDK1138 build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1138: 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. which will gracefully inform our customers that the version they're using is no longer supported. If necessary, the warning can be disabled by setting the `$(CheckEolWorkloads)` MSBuild property to False. TODO: This does not fully solve issue #8003 as future changes are likely needed in the .NET 8 `android` workload. [0]: https://devblogs.microsoft.com/dotnet/dotnet-maui-dotnet-7/
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
May 17, 2023
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
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
May 24, 2023
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.
jonpryor
pushed a commit
that referenced
this issue
May 26, 2023
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.
ghost
locked as resolved and limited conversation to collaborators
Jun 25, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In #7900 we removed the ability to target
net6.0-android
from a .NET 8 install.However if a user attempts this, they receive an incorrect error message:
If they attempt to run
dotnet workload restore
as instructed, they receive:We need to provide a better error message to the user letting them know this scenario isn't possible rather than provide instructions that will not work.
This issue should be reproducible with the following TF:
The text was updated successfully, but these errors were encountered: