Skip to content

[msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion.#8858

Merged
rolfbjarne merged 1 commit into
dotnet:mainfrom
rolfbjarne:msbuild-get-minimumosversion
Jun 16, 2020
Merged

[msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion.#8858
rolfbjarne merged 1 commit into
dotnet:mainfrom
rolfbjarne:msbuild-get-minimumosversion

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

This makes it possible for several other tasks to take the MinimumOSVersion as
direct input, instead of the app manifest's path. Previously the app manifest
(Info.plist) was loaded and parsed in each task, slightly differently in each
place, and in addition there are differences between macOS and other
platforms, which made it even worse. This code refactoring also made it
possible to remove an error code which wasn't necessary anymore.

This task also computes the default MinimumOSVersion if none is specified in
the app manifest.

There is one breaking change: a library project could previously specify an
inexistent Info.plist, and it would build fine. This will now result in a
"Error loading 'Info.plist': File not found" error. This is trivial to fix:
just remove the Info.plist from the project file (or an alternative solution
could be to condition the inclusion of the Info.plist in the project file on
the existence of the Info.plist).

New commits in xamarin/Xamarin.MacDev:

Diff: https://github.com/xamarin/Xamarin.MacDev/compare/45c5a680e20a209ac846a32e0f2f0f83e843ab76..a1bc6f39b3efe5d817c60d78eaff3f4c2de720ea

…t and outputs the MinimumOSVersion.

This makes it possible for several other tasks to take the MinimumOSVersion as
direct input, instead of the app manifest's path. Previously the app manifest
(Info.plist) was loaded and parsed in each task, slightly differently in each
place, and in addition there are differences between macOS and other
platforms, which made it even worse. This code refactoring also made it
possible to remove an error code which wasn't necessary anymore.

This task also computes the default MinimumOSVersion if none is specified in
the app manifest.

There is one breaking change: a library project could previously specify an
inexistent Info.plist, and it would build fine. This will now result in a
"Error loading 'Info.plist': File not found" error. This is trivial to fix:
just remove the Info.plist from the project file (or an alternative solution
could be to condition the inclusion of the Info.plist in the project file on
the existence of the Info.plist).

New commits in xamarin/Xamarin.MacDev:

* dotnet/macios-devtools@a1bc6f3 [Xamarin.MacDev] Split IAppleSdkVersion.TryParse in two methods. (dotnet#73)

Diff: https://github.com/xamarin/Xamarin.MacDev/compare/45c5a680e20a209ac846a32e0f2f0f83e843ab76..a1bc6f39b3efe5d817c60d78eaff3f4c2de720ea
@rolfbjarne rolfbjarne requested review from chamons and emaf as code owners June 15, 2020 18:01
@rolfbjarne rolfbjarne added the not-notes-worthy Ignore for release notes label Jun 15, 2020
@monojenkins

Copy link
Copy Markdown
Contributor

Build success
Provisioning succeeded
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
Test run succeeded

@rolfbjarne rolfbjarne merged commit 6ced972 into dotnet:main Jun 16, 2020
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants