Skip to content

[dotnet] Support SupportedOSPlatformVersion. Fixes #12336.#12638

Merged
rolfbjarne merged 6 commits intodotnet:mainfrom
rolfbjarne:dotnet-minimumosversion
Sep 8, 2021
Merged

[dotnet] Support SupportedOSPlatformVersion. Fixes #12336.#12638
rolfbjarne merged 6 commits intodotnet:mainfrom
rolfbjarne:dotnet-minimumosversion

Conversation

@rolfbjarne
Copy link
Member

  • Add support for the SupportedOSPlatformVersion MSBuild property, and write
    it to the Info.plist for the corresponding minimum OS version.
  • If there are any minimum OS version in the Info.plist, we'll now show an
    error if it doesn't match SupportedOSPlatformVersion.

This unfortunately means that if there's any minimum OS version in any
Info.plist, then that will most likely have to be moved to the
SupportedOSPlatformVersion property (or removed entirely if that's the right
choice), since it's unlikely to match the default value for
SupportedOSPlatformVersion. However, this was deemed to be the best option for
the future (it's a one-time pain during migration).

Also add new tests, update existing tests, and update the templates.

Fixes #12336.

* Add support for the SupportedOSPlatformVersion MSBuild property, and write it
  to the Info.plist for the corresponding minimum OS version.
* If there are any minimum OS version in the Info.plist, and show an error if it
  doesn't match SupportedOSPlatformVersion.

This unfortunately means that if there's any minimum OS version in any Info.plist,
then that will most likely have to be moved to the SupportedOSPlatformVersion property
(or removed entirely if that's the right choice), since it's unlikely to match the
default value for SupportedOSPlatformVersion. However, this was deemed to be the
best option for the future (it's a one-time pain during migration).

Fixes dotnet#12336.
@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (only version changes)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

2 tests failed, 201 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2644 Passed: 2490 Inconclusive: 35 Failed: 1 Ignored: 153)
  • MSBuild tests/Integration: Failed (Execution failed with exit code 32)

Pipeline on Agent XAMBOT-1104.BigSur'
Merge a12c280 into 56dd828

…h the Info.plist value (for projects that must share Info.plist with legacy tests).
"replaces": "minOSVersion",
"datatype": "string",
"defaultValue": "11.2"
"defaultValue": "14.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ? it's still 11.2 for iOS
which I assume is to use the new UIScene API as they are newer than the 10.0 minimum ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what happened here 🤔

return false;
} else if (!string.IsNullOrEmpty (convertedSupportedOSPlatformVersion) && convertedSupportedOSPlatformVersion != minimumOSVersionInManifest) {
// SupportedOSPlatformVersion and the value in the Info.plist are not the same. This is an error.
Log.LogError (null, null, null, AppManifest, 0, 0, 0, 0, "The {0} value in the Info.plist ({1}) does not match the SupportedOSPlatformVersion value in the project file ({2}).", minimumVersionKey, minimumOSVersionInManifest, SupportedOSPlatformVersion); // FIXME: add tests + translated string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// FIXME: add tests + translated string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spouliot fixed now (I'd already written the test, so I just had to localize the message).

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (only version changes)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

🎉 All 203 tests passed 🎉

Pipeline on Agent XAMBOT-1094.BigSur'
Merge e261117 into 8bfa577

@rolfbjarne rolfbjarne merged commit 24ea027 into dotnet:main Sep 8, 2021
@rolfbjarne rolfbjarne deleted the dotnet-minimumosversion branch September 8, 2021 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes run-dotnet-tests Run all the .NET tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure MinimumOSVersion is is consistent withSupportedOSPlatformVersion

5 participants