xamarin-macios/msbuild
Rolf Bjarne Kvinge 1d9a02cbef
[dotnet] Figure out where to publish files in the app bundle. Fixes #12572. (#13591)
In .NET, all files that should be published (put into the final .app bundle) are put into the @(ResolvedFileToPublish) item group, and at the end of the build process, .NET will publish all the files in that item group. Which files are in this item group, and how they're put in there, is out of our control (it's just how the build process works in .NET), so we'll have to cope.

Additionally, publishing an app for Apple platforms is different than publishing other .NET apps, because we can't just put all the files in the a directory like .NET usually does, we have a fairly strict directory structure we need to follow, and it also differs between platforms (the structure is different between macOS and iOS for instance).

This means that for every file in the `ResolvedFileToPublish` item group, we have to figure out:

* Should it be put into the app bundle in the first place?
* If so, in which subdirectory (if any)?

This PR implements these changes. The exact details are explained in a document in the PR, but the general logic is:

* We make an educated guess for some types of files we know about (assemblies, unmanaged libraries, images, etc).
* We provide a way to set metadata on each item specifying which type of item it is (assembly, unmanaged library, image, etc), and we'll treat the item as such. This method can also be used to override the guess we made (for files that shouldn't be published for instance).
* We warn if we run into files we're not educated enough to be able to guess about, and for which there's no custom metadata set.

Fixes https://github.com/xamarin/xamarin-macios/issues/12572.
2022-01-17 09:50:06 +01:00
..
Messaging/Xamarin.Messaging.Build Updated Xamarin.Messaging version (#13145) 2021-10-28 17:00:14 +02:00
Xamarin.HotRestart.PreBuilt [msbuild] Make sure to update global.json/NuGet.config for the Xamarin.HotRestart.PreBuilt build whenever needed. (#13625) 2021-12-22 21:54:18 +01:00
Xamarin.Localization.MSBuild Merge remote-tracking branch 'origin/main' into dotnet-resolvedfiletopublish 2022-01-11 17:32:26 +01:00
Xamarin.Mac.Tasks [msbuild] Share the _CleanAppBundleRootDirectory target between iOS and Mac logic. (#13680) 2022-01-12 19:21:45 +01:00
Xamarin.Mac.Tasks.Core [msbuild] Share the ALToolUpload and ALToolValidate task implementations between iOS and macOS. (#12852) 2021-09-28 17:38:51 +02:00
Xamarin.MacDev.Tasks [msbuild] Add a ComputeBundleLocation task 2021-12-22 10:17:35 +01:00
Xamarin.MacDev.Tasks.Core [msbuild] Touch all files when copying an app extension into the app. (#13721) 2022-01-17 09:05:08 +01:00
Xamarin.ObjcBinding.Tasks [msbuild] Remove support for XI/Classic. (#976) 2016-10-13 10:47:46 +02:00
Xamarin.Shared [dotnet] Figure out where to publish files in the app bundle. Fixes #12572. (#13591) 2022-01-17 09:50:06 +01:00
Xamarin.iOS.Tasks [msbuild] Share the CompileEntitlements task implementation between iOS and macOS. (#12946) 2021-10-07 08:17:50 +02:00
Xamarin.iOS.Tasks.Core [msbuild] Share the _CleanAppBundleRootDirectory target between iOS and Mac logic. (#13680) 2022-01-12 19:21:45 +01:00
Xamarin.iOS.Tasks.Windows Ensure we remotely copy all project pdbs and not only the main app one (#13650) 2022-01-06 08:00:15 -05:00
.gitignore [msbuild] Sign Xamarin.iOS.Tasks.dll and Xamarin.Mac.Tasks.dll. Fixes #9835. (#12831) 2021-09-28 17:31:35 +02:00
Directory.Build.props Updated Xamarin.Messaging reference (#13615) 2021-12-21 09:24:42 +01:00
ILMerge.targets [msbuild] Add ILStrip'ing for net6 applications. Fixes #11445. (#12563) 2021-10-05 09:43:22 -05:00
Makefile [msbuild/dotnet] Build the Xamarin.PreBuilt.iOS app bundle. Fixes #12945. (#13342) 2021-11-12 07:38:07 +01:00
Xamarin.MacDev.Tasks.sln [dotnet] Revert changes that separate Messaging from Xamarin.iOS.Tasks to fix dotnet build (#10738) 2021-03-01 08:05:01 +01:00