-
Notifications
You must be signed in to change notification settings - Fork 528
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
[build] remove .NET 6 support #7900
Conversation
Context: dotnet/android#7900 After attempted removal of .NET 6 (from .NET 8), we got the build error: Xamarin.Legacy.Android.targets(33,3): error : Could not resolve SDK "Microsoft.Android.Sdk.net6". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK. Xamarin.Legacy.Android.targets(33,3): error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null. Xamarin.Legacy.Android.targets(33,3): error : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json. Xamarin.Legacy.Android.targets(33,3): error : MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.Android.Sdk.net6" because directory "/Users/runner/work/1/s/xamarin-android/bin/Release/dotnet/sdk/8.0.100-preview.3.23163.4/Sdks/Microsoft.Android.Sdk.net6/Sdk" did not exist. Add support for the .NET 8 SDK, I am unsure how it was working at all before? It must have somehow imported the .NET 6 targets.
Context: dotnet/android#7900 After attempted removal of .NET 6 (from .NET 8), we got the build error: Xamarin.Legacy.Android.targets(33,3): error : Could not resolve SDK "Microsoft.Android.Sdk.net6". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK. Xamarin.Legacy.Android.targets(33,3): error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null. Xamarin.Legacy.Android.targets(33,3): error : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json. Xamarin.Legacy.Android.targets(33,3): error : MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.Android.Sdk.net6" because directory "/Users/runner/work/1/s/xamarin-android/bin/Release/dotnet/sdk/8.0.100-preview.3.23163.4/Sdks/Microsoft.Android.Sdk.net6/Sdk" did not exist. Add support for the .NET 8 SDK, I am unsure how it was working at all before? It must have somehow imported the .NET 6 targets.
Context: https://dotnet.microsoft.com/platform/support/policy/maui > A major version of .NET MAUI receives support for a minimum of 6 > months after a successor (the next major release) ships. For > example, .NET MAUI 6.0 will be supported for 6 months after .NET > MAUI 7.0 ships. Similarly, .NET MAUI 7.0 will receive support for 6 > months after .NET MAUI 8.0 ships. By the time .NET 8 GA ships, .NET 6 MAUI projects will not be supported. Remove .NET 6 support from the `android` workload. I removed `net6.0-android` parameters from various tests, making sure we still have .NET 7 and .NET 8 tests.
bcd1bbc
to
e653f79
Compare
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 do wonder if there is a better way to drive what we include in the manifest. Some way that means fewer changes overall. Like a property or item group which xaprepare uses to "include" the required versions which are supported.
I think when we move to .NET 9, might be a good place to try doing this. At that point, I think we might have the patterns down. Right now things are still getting renamed/changing related to workloads. |
Context: https://dotnet.microsoft.com/platform/support/policy/maui > A major version of .NET MAUI receives support for a minimum of 6 > months after a successor (the next major release) ships. For > example, .NET MAUI 6.0 will be supported for 6 months after .NET > MAUI 7.0 ships. Similarly, .NET MAUI 7.0 will receive support for 6 > months after .NET MAUI 8.0 ships. By the time .NET 8 GA ships, .NET 6 MAUI projects will not be supported. Remove .NET 6 support from the .NET 8 `android` workload. I removed `net6.0-android` parameters from various tests, making sure we still have .NET 7 and .NET 8 tests.
* main: [build] remove .NET 6 support (dotnet#7900) [profiled-aot] update `dotnet.aotprofile` for .NET 8 (dotnet#7908) [tests] Add backup ssl sites in case of 429 response. (dotnet#7909) $(AndroidPackVersionSuffix)=preview.4; net8 is 34.0.0-preview.4 (dotnet#7912)
* main: (94 commits) [ci] Remove remaining Classic test jobs. (dotnet#7924) Add Nightly Tests for Humanizer [readme] Add aka.ms links for d17.5. (dotnet#7935) [tests] Remove `net472` multitargeting (dotnet#7932) [monodroid] Fix `ld` build error on Nightly Builds. (dotnet#7925) Bump to xamarin/Java.Interop/main@0355acf (dotnet#7931) [tests] Use msftconnecttest.com in QuoteInvalidQuoteUrlsShouldWork (dotnet#7919) [ci] Don't set demands for megapipeline (dotnet#7929) [Mono.Android] Bind API-UpsideDownCake Developer Preview 1 (dotnet#7796) Bump to dotnet/installer@d109cba3ff 8.0.100-preview.4.23176.5 (dotnet#7921) [Xamarin.Android.Build.Tasks] Fix Android Version Code for Release builds (dotnet#7795) Bump to dotnet/installer@27d6769dfb 8.0.100-preview.4.23172.16 (dotnet#7910) [Xamarin.Android.Build.Tasks] Fix native code generation when marshal methods are disabled (dotnet#7899) [ci] Optimize 'APK's .NET' test job overhead. (dotnet#7904) [Mono.Android] delay JNINativeWrapper.get_runtime_types() (dotnet#7913) Bump external/Java.Interop from `73ebad2` to `53bfb4a` (dotnet#7914) [build] remove .NET 6 support (dotnet#7900) [profiled-aot] update `dotnet.aotprofile` for .NET 8 (dotnet#7908) [tests] Add backup ssl sites in case of 429 response. (dotnet#7909) $(AndroidPackVersionSuffix)=preview.4; net8 is 34.0.0-preview.4 (dotnet#7912) ...
Do I understand it correctly, that it's not possible to build a .NET 6 compatible project (single- or multi-target) while on .NET 8 SDK now? Even if the project itself has nothing to do with MAUI and uses native controls or other framework? |
Yeah, this was following the support policy here: https://dotnet.microsoft.com/en-us/platform/support/policy/maui It is basically the "modern support policy" brought forward from Xamarin. If you need to build |
This removal will impact library owners like me because I cannot target additional .NET8, but have to remove .NET6 and MonoAndroid as well from the supported target frameworks. :( |
@tuyen-vuduc this might be a good stop gap https://github.com/xamarin/Xamarin.Legacy.Sdk |
@dellis1972 It fails to compile and package the nuget packages even if .NET8 isn't a part of supported frameworks. :( . The check should show as a warning, rather than a error. I'll try again to see if I can use global.json to configure to use .NET7 and previous ones. Regarding legacy SDK, yes, I am using it right now to target multiple frameworks including MonoAndroid and .NET6+ You can check out my binding libraries in this repo. |
Given the support policy: https://dotnet.microsoft.com/platform/support/policy/maui Why do you need to support |
Context: https://dotnet.microsoft.com/platform/support/policy/maui
By the time .NET 8 GA ships, .NET 6 MAUI projects will not be supported.
Remove .NET 6 support from the
android
workload.I removed
net6.0-android
parameters from various tests, making sure we still have .NET 7 and .NET 8 tests.