-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add warning for optional workload EOL #32426
Add warning for optional workload EOL #32426
Conversation
<NETSdkWarning ResourceName="WorkloadIsEol" | ||
FormatArguments="%(EolWorkload.Identity);$([MSBuild]::ValueOrDefault('%(EolWorkload.Url)', 'https://aka.ms/dotnet-core-support'))" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I batched this as you'll probably get a warning for maui
and android
, even in a project with a single TargetFramework=net6.0-android
.
dd5aa53
to
4830ebd
Compare
Context: https://aka.ms/maui-support-policy Context: dotnet/android#8030 For out-of-support .NET 6 MAUI projects, we'd like to emit the warning: 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. Where each optional workload can opt into this warning via `AutoImport.props`: <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> We would add to this MSBuild item group in the `android`, `ios`, `macos`, `maccatalyst`, `tvos` and `maui` workloads. In the future, `wasm-tools` could opt into the warning and leave `%(Url)` blank if desired. Customers can opt out of the warning in their `.csproj` by either: <PropertyGroup> <CheckEolWorkloads>false</CheckEolWorkloads> </PropertyGroup> <ItemGroup> <EolWorkload Remove="android" /> </ItemGroup> See dotnet/android#8030 for the exact changes we'd make in optional workloads.
4830ebd
to
43d1b03
Compare
I kept getting merge conflicts about the |
When you do a local build, the .xlf files should be updated. If you're getting conflicts you may need to merge in the upstream changes from the corresponding .resx files. |
@dsplaisted @marcpopMSFT what would we need to do to backport to .NET 6 and 7 for this one? |
You'd need to cherry-pick it to branches such as release/7.0.4xx. For servicing branches, we'd need to submit it to .NET Tactics. |
Is there a magic comment that does this? Or do you manually open a PR and put |
No, backports are manual in the SDK repo. For a lot of our active older branches there is automatic codeflow to newer releases. The label we use is It's probably fine to only fill out the template for one PR, and when you send the approval email you can link all of the PRs in the mail and paste the approval template. |
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/
Context: https://aka.ms/maui-support-policy Context: dotnet/android@25cb50d Context: dotnet/sdk#32426 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)' == 'iOS' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="ios" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> This will cause `dotnet build` to issue a new NETSDK1202 build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1202: The workload 'ios' 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. I had to update the `Makefile` to do a `@PLATFORM_LOWERCASE@` replacement for this.
Context: https://aka.ms/maui-support-policy Context: dotnet/android@25cb50d Context: dotnet/sdk#32426 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=" '$(UseMaui)' == 'true' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="maui" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> This will cause `dotnet build` to issue a new NETSDK1202 build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1202: The workload 'maui' 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. I also included the message for any one of `$(UseMaui)`, `$(UseMauiAssets)`, `$(UseMauiCore)`, or `$(UseMauiEssentials)`.
Context: https://aka.ms/maui-support-policy Context: dotnet/android@25cb50d Context: dotnet/sdk#32426 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)' == 'iOS' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="ios" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> This will cause `dotnet build` to issue a new NETSDK1202 build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1202: The workload 'ios' 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. I had to update the `Makefile` to do a `@PLATFORM_LOWERCASE@` replacement for this.
* [workload] add metadata about .NET 6 EOL Context: https://aka.ms/maui-support-policy Context: dotnet/android@25cb50d Context: dotnet/sdk#32426 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=" '$(UseMaui)' == 'true' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="maui" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> This will cause `dotnet build` to issue a new NETSDK1202 build warning: dotnet\sdk\6.0.409\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning NETSDK1202: The workload 'maui' 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. I also included the message for any one of `$(UseMaui)`, `$(UseMauiAssets)`, `$(UseMauiCore)`, or `$(UseMauiEssentials)`. * Check if `$(TargetFrameworkVersion)` is blank We were doing this in other conditions in this file.
Backport of dotnet#32426 Context: https://aka.ms/maui-support-policy Context: dotnet/android#8030 For out-of-support .NET 6 MAUI projects, we'd like to emit the warning: Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning 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. Where each optional workload can opt into this warning via `AutoImport.props`: <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> We would add to this MSBuild item group in the `android`, `ios`, `macos`, `maccatalyst`, `tvos` and `maui` workloads. In the future, `wasm-tools` could opt into the warning and leave `%(Url)` blank if desired. Customers can opt out of the warning in their `.csproj` by either: <PropertyGroup> <CheckEolWorkloads>false</CheckEolWorkloads> </PropertyGroup> <ItemGroup> <EolWorkload Remove="android" /> </ItemGroup> See dotnet/android#8030 for the exact changes we'd make in optional workloads.
Backport of dotnet#32426 Context: https://aka.ms/maui-support-policy Context: dotnet/android#8030 For out-of-support .NET 6 MAUI projects, we'd like to emit the warning: Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(35,5): warning 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. Where each optional workload can opt into this warning via `AutoImport.props`: <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) "> <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> </ItemGroup> We would add to this MSBuild item group in the `android`, `ios`, `macos`, `maccatalyst`, `tvos` and `maui` workloads. In the future, `wasm-tools` could opt into the warning and leave `%(Url)` blank if desired. Customers can opt out of the warning in their `.csproj` by either: <PropertyGroup> <CheckEolWorkloads>false</CheckEolWorkloads> </PropertyGroup> <ItemGroup> <EolWorkload Remove="android" /> </ItemGroup> See dotnet/android#8030 for the exact changes we'd make in optional workloads.
…on't support. If a project tried to use a .NET 6 project (say TargetFramework=net6.0-ios), then we used to show these rather unhelpful errors: error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools-net6 error NETSDK1147: To install these workloads, run the following command: dotnet workload restore The underlying problem is that we don't support .NET 6 anymore, so with this fix we now show: error NETSDK1202: The workload 'net6.0-ios' 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 is much more helpful. References: * dotnet/sdk#32426 * dotnet/android#8047 Fixes xamarin#18790.
…on't support. If a project tried to use a .NET 6 project (say TargetFramework=net6.0-ios), then we used to show these rather unhelpful errors: error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools-net6 error NETSDK1147: To install these workloads, run the following command: dotnet workload restore The underlying problem is that we don't support .NET 6 anymore, so with this fix we now show: error NETSDK1202: The workload 'net6.0-ios' 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 is much more helpful. References: * dotnet/sdk#32426 * dotnet/android#8047 Fixes xamarin#18790.
…on't support. (#20142) If a project tried to use a .NET 6 project (say TargetFramework=net6.0-ios), then we used to show these rather unhelpful errors: error NETSDK1147: To build this project, the following workloads must be installed: wasm-tools-net6 error NETSDK1147: To install these workloads, run the following command: dotnet workload restore The underlying problem is that we don't support .NET 6 anymore, so with this fix we now show: error NETSDK1202: The workload 'net6.0-ios' 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 is much more helpful. References: * dotnet/sdk#32426 * dotnet/android#8047 Fixes #18790.
Context: https://aka.ms/maui-support-policy
Context: dotnet/android#8030
For out-of-support .NET 6 MAUI projects, we'd like to emit the warning:
Where each optional workload can opt into this warning via
AutoImport.props
:We would add to this MSBuild item group in the
android
,ios
,macos
,maccatalyst
,tvos
andmaui
workloads. In the future,wasm-tools
could opt into the warning and leave%(Url)
blank if desired.Customers can opt out of the warning in their
.csproj
by either:See dotnet/android#8030 for the exact changes we'd make in optional workloads.