Repository navigation
[.NET 10] invent a "recommended min OS version" for 24 #9527
Description
Activity
- addedArea: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
on Nov 19, 2024 - addedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Nov 19, 2024 There's some work towards changing the default
SupportedOSPlatformVersionto the minimum valid value across all of .NET - if that could be tweaked a little bit to say the defaultSupportedOSPlatformVersionis a recommended value each individual SDK sets, then that could work for this:- Introduce a new
RecommendedSupportedOSPlatformVersionproperty, which Android could set to24(for iOS we could set it to the minimum we support, unless we have a reason to do otherwise). - If
RecommendedSupportedOSPlatformVersionis not set, then .NET keeps the same behavior as today (or change the default to the minimum, either way would work).
There are a couple of advantages:
- No hardcoding values in the user's csproj, which will eventually end up invalid one day.
- Telemetry is actually useful: if an app has
SupportedOSPlatformVersion=21, we'll know it's on purpose, and not by accident.
CC @Redth
- Introduce a new
This seems like a good approach to me. It may also help with Windows' concern over changing implicit behaviour / current defaults. I could see us setting this value in the MAUI SDK for Windows if they were willing to add logic to check for the value and use it if no other explicit value is specified already.
- removedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Nov 20, 2024 - added a commit that references this issue
on Jan 10, 2025 I think it should instead do 23 as unity itself requires 23 and so doing 23 instead of 24 as minimum will give unity more motivation to instead ship as a shared framework instead on top of the existing .NET runtime (and not have it use it's own copy of the normal runtime anymore). The way the current unity works is a disaster so having it as 23 is a good first step to allow unity to do the best change moving forward.
Are you talking about Unity3D or something else? I’m not aware of Unity3D being able to use .NET for Android, it doesn’t hook into MSBuild the same way as regular .NET projects, so I don’t see how it would work today.
- addedenhancementProposed change to current functionality.Proposed change to current functionality.
on Jan 21, 2025 CoreCLR already has a minimum of API 24 in .NET 11, we can close this now.
- locked and limited conversation to collaborators
on Sep 12, 2026
Android framework version
net9.0-android
Affected platform version
any
Description
We would like to bump the minimum Android OS version to 24 (instead of 21), but we need to do it in a non-disruptive way.
I propose something like:
SupportedOSPlatformVersion=24in project templatesSupportedOSPlatformVersion=24is the defaultSupportedOSPlatformVersion=21, for exampleSupportedOSPlatformVersion < 24Steps to Reproduce
Ideally, it would:
dotnet new androiddotnet buildminSdkVersion="24"in the resulting.apkDid you find any workaround?
Set
SupportedOSPlatformVersion=24manually.