-
Notifications
You must be signed in to change notification settings - Fork 537
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
SupportedOSPlatformVersion and minSdkVersion interactions #8040
Comments
Also looping in @rolfbjarne and @Redth for any thoughts/comments or feature parity considerations on other platforms. |
The only note is that you can leave And what the .NET SDK does in this case is just use the target version as minimum, so these: <TargetFramework>net7.0-android</TargetFramework>
<TargetFramework>net7.0-android33</TargetFramework>
<TargetFramework>net7.0-android33.0</TargetFramework> All default to So is We could maybe attempt to set a default for |
I don't think there's ~ever a case where this is desired. Setting a
This feels like what we should be trying to do. |
This is our current behavior for projects which both a) include an It sounds like it may be a better experience to set |
So for iOS and our other Apple platforms:
|
@rolfbjarne excellent thanks, some follow up thoughts:
|
So I think an error is best, that way we don't have apparently confusing behavior.
In the initial implementation for .NET 5, it turned out I needed a rather big refactoring in order to be able to read
So I don't see a problem with having different behavior between Android and iOS for the default min version, since there are clear differences between the platforms. |
We have an issue where we will sometimes generate an AndroidManifest.xml file with a
minSdkVersion
element of 19, a version lower than our supported minimum of 21. I started on a fix in #8026 but wanted to discuss the user experience around this further.I would propose the following:
minSdkVersion
explicitly in their manifest, we should always setminSdkVersion
toSupportedOSPlatformVersion
, regardless of whether the manifest has atargetSdkVersion
set or not. We shouldn't flip this value arbitrarily to 19 (or 21) iftargetSdkVersion
is set.SupportedOSPlatformVersion
< 21 orminSdkVersion
< 21. The .NET SDK may have one we can hook into for the former, but we will probably need to write our own for the latter.minSdkVersion
explicitly in their manifest and it does not matchSupportedOSPlatformVersion
, we should preferSupportedOSPlatformVersion
and warn the user.The # 3 proposal above is potentially the larger behavior change to consider. Folks may be more accustomed to setting
minSdkVersion
in their manifests, as I don’t believe we’ve had a corresponding MSBuild property for this in the past. However, I think we want to be moving in a direction where we steer folks away from these kind of platform specific settings. In that regard preferringSupportedOSPlatformVersion
overminSdkVersion
feels like the better behavior.The text was updated successfully, but these errors were encountered: