From 30e4dae5bd9d1debad83e3bc7cead4c3cd369212 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 30 Sep 2024 19:13:46 +0200 Subject: [PATCH 1/3] [dotnet] Don't link with BrowserEngineKit. Fixes #21324. Fixes https://github.com/xamarin/xamarin-macios/issues/21324. --- dotnet/targets/Xamarin.Shared.Sdk.targets | 5 + tests/dotnet/UnitTests/ProjectTest.cs | 652 ++++++++++++++++++++++ 2 files changed, 657 insertions(+) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 61b32c561f43..328735982af5 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -1526,6 +1526,11 @@ <_NativeExecutableFrameworks Include="Security" /> + + <_NativeExecutableFrameworks Remove="BrowserEngineKit" Condition="'$(LinkWithBrowserEngineKit)' != 'true'" /> + <_MainLinkerFlags Include="-lz" /> <_MainLinkerFlags Include="-liconv" /> diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index f3d9e9247a6f..6a5a0807e32b 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2071,5 +2071,657 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl properties ["SetAppendRuntimeIdentifierToOutputPathToFalse"] = "true"; DotNet.AssertBuild (project_path, properties); } + + static string[] expectedFrameworks_iOS_None = [ + "/System/Library/Frameworks/Accelerate.framework/Accelerate", + "/System/Library/Frameworks/Accessibility.framework/Accessibility", + "/System/Library/Frameworks/AccessorySetupKit.framework/AccessorySetupKit", + "/System/Library/Frameworks/Accounts.framework/Accounts", + "/System/Library/Frameworks/AddressBook.framework/AddressBook", + "/System/Library/Frameworks/AddressBookUI.framework/AddressBookUI", + "/System/Library/Frameworks/AdServices.framework/AdServices", + "/System/Library/Frameworks/AdSupport.framework/AdSupport", + "/System/Library/Frameworks/AppClip.framework/AppClip", + "/System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency", + "/System/Library/Frameworks/ARKit.framework/ARKit", + "/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox", + "/System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices", + "/System/Library/Frameworks/AutomaticAssessmentConfiguration.framework/AutomaticAssessmentConfiguration", + "/System/Library/Frameworks/AVFoundation.framework/AVFoundation", + "/System/Library/Frameworks/AVKit.framework/AVKit", + "/System/Library/Frameworks/AVRouting.framework/AVRouting", + "/System/Library/Frameworks/BackgroundAssets.framework/BackgroundAssets", + "/System/Library/Frameworks/BackgroundTasks.framework/BackgroundTasks", + "/System/Library/Frameworks/BusinessChat.framework/BusinessChat", + "/System/Library/Frameworks/CallKit.framework/CallKit", + "/System/Library/Frameworks/CarPlay.framework/CarPlay", + "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", + "/System/Library/Frameworks/Cinematic.framework/Cinematic", + "/System/Library/Frameworks/ClassKit.framework/ClassKit", + "/System/Library/Frameworks/CloudKit.framework/CloudKit", + "/System/Library/Frameworks/Contacts.framework/Contacts", + "/System/Library/Frameworks/ContactsUI.framework/ContactsUI", + "/System/Library/Frameworks/CoreAudioKit.framework/CoreAudioKit", + "/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth", + "/System/Library/Frameworks/CoreData.framework/CoreData", + "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", + "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", + "/System/Library/Frameworks/CoreHaptics.framework/CoreHaptics", + "/System/Library/Frameworks/CoreImage.framework/CoreImage", + "/System/Library/Frameworks/CoreLocation.framework/CoreLocation", + "/System/Library/Frameworks/CoreLocationUI.framework/CoreLocationUI", + "/System/Library/Frameworks/CoreMedia.framework/CoreMedia", + "/System/Library/Frameworks/CoreMIDI.framework/CoreMIDI", + "/System/Library/Frameworks/CoreML.framework/CoreML", + "/System/Library/Frameworks/CoreMotion.framework/CoreMotion", + "/System/Library/Frameworks/CoreNFC.framework/CoreNFC", + "/System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight", + "/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", + "/System/Library/Frameworks/CoreText.framework/CoreText", + "/System/Library/Frameworks/CoreVideo.framework/CoreVideo", + "/System/Library/Frameworks/CryptoTokenKit.framework/CryptoTokenKit", + "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck", + "/System/Library/Frameworks/DeviceDiscoveryExtension.framework/DeviceDiscoveryExtension", + "/System/Library/Frameworks/EventKit.framework/EventKit", + "/System/Library/Frameworks/EventKitUI.framework/EventKitUI", + "/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory", + "/System/Library/Frameworks/FileProvider.framework/FileProvider", + "/System/Library/Frameworks/FileProviderUI.framework/FileProviderUI", + "/System/Library/Frameworks/Foundation.framework/Foundation", + "/System/Library/Frameworks/GameController.framework/GameController", + "/System/Library/Frameworks/GameKit.framework/GameKit", + "/System/Library/Frameworks/GameplayKit.framework/GameplayKit", + "/System/Library/Frameworks/GLKit.framework/GLKit", + "/System/Library/Frameworks/GSS.framework/GSS", + "/System/Library/Frameworks/HealthKit.framework/HealthKit", + "/System/Library/Frameworks/HealthKitUI.framework/HealthKitUI", + "/System/Library/Frameworks/HomeKit.framework/HomeKit", + "/System/Library/Frameworks/IdentityLookup.framework/IdentityLookup", + "/System/Library/Frameworks/IdentityLookupUI.framework/IdentityLookupUI", + "/System/Library/Frameworks/ImageIO.framework/ImageIO", + "/System/Library/Frameworks/Intents.framework/Intents", + "/System/Library/Frameworks/IntentsUI.framework/IntentsUI", + "/System/Library/Frameworks/IOSurface.framework/IOSurface", + "/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore", + "/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation", + "/System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication", + "/System/Library/Frameworks/MapKit.framework/MapKit", + "/System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility", + "/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer", + "/System/Library/Frameworks/MediaSetup.framework/MediaSetup", + "/System/Library/Frameworks/MediaToolbox.framework/MediaToolbox", + "/System/Library/Frameworks/Messages.framework/Messages", + "/System/Library/Frameworks/MessageUI.framework/MessageUI", + "/System/Library/Frameworks/Metal.framework/Metal", + "/System/Library/Frameworks/MetalFX.framework/MetalFX", + "/System/Library/Frameworks/MetalKit.framework/MetalKit", + "/System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders", + "/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/MetalPerformanceShadersGraph", + "/System/Library/Frameworks/MetricKit.framework/MetricKit", + "/System/Library/Frameworks/MLCompute.framework/MLCompute", + "/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices", + "/System/Library/Frameworks/ModelIO.framework/ModelIO", + "/System/Library/Frameworks/MultipeerConnectivity.framework/MultipeerConnectivity", + "/System/Library/Frameworks/NaturalLanguage.framework/NaturalLanguage", + "/System/Library/Frameworks/NearbyInteraction.framework/NearbyInteraction", + "/System/Library/Frameworks/Network.framework/Network", + "/System/Library/Frameworks/NetworkExtension.framework/NetworkExtension", + "/System/Library/Frameworks/NotificationCenter.framework/NotificationCenter", + "/System/Library/Frameworks/OpenGLES.framework/OpenGLES", + "/System/Library/Frameworks/OSLog.framework/OSLog", + "/System/Library/Frameworks/PassKit.framework/PassKit", + "/System/Library/Frameworks/PDFKit.framework/PDFKit", + "/System/Library/Frameworks/PencilKit.framework/PencilKit", + "/System/Library/Frameworks/PHASE.framework/PHASE", + "/System/Library/Frameworks/Photos.framework/Photos", + "/System/Library/Frameworks/PhotosUI.framework/PhotosUI", + "/System/Library/Frameworks/PushKit.framework/PushKit", + "/System/Library/Frameworks/PushToTalk.framework/PushToTalk", + "/System/Library/Frameworks/QuartzCore.framework/QuartzCore", + "/System/Library/Frameworks/QuickLook.framework/QuickLook", + "/System/Library/Frameworks/QuickLookThumbnailing.framework/QuickLookThumbnailing", + "/System/Library/Frameworks/ReplayKit.framework/ReplayKit", + "/System/Library/Frameworks/SafariServices.framework/SafariServices", + "/System/Library/Frameworks/SafetyKit.framework/SafetyKit", + "/System/Library/Frameworks/SceneKit.framework/SceneKit", + "/System/Library/Frameworks/ScreenTime.framework/ScreenTime", + "/System/Library/Frameworks/Security.framework/Security", + "/System/Library/Frameworks/SensitiveContentAnalysis.framework/SensitiveContentAnalysis", + "/System/Library/Frameworks/SensorKit.framework/SensorKit", + "/System/Library/Frameworks/SharedWithYou.framework/SharedWithYou", + "/System/Library/Frameworks/SharedWithYouCore.framework/SharedWithYouCore", + "/System/Library/Frameworks/ShazamKit.framework/ShazamKit", + "/System/Library/Frameworks/Social.framework/Social", + "/System/Library/Frameworks/SoundAnalysis.framework/SoundAnalysis", + "/System/Library/Frameworks/Speech.framework/Speech", + "/System/Library/Frameworks/SpriteKit.framework/SpriteKit", + "/System/Library/Frameworks/StoreKit.framework/StoreKit", + "/System/Library/Frameworks/Symbols.framework/Symbols", + "/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration", + "/System/Library/Frameworks/ThreadNetwork.framework/ThreadNetwork", + "/System/Library/Frameworks/Twitter.framework/Twitter", + "/System/Library/Frameworks/UIKit.framework/UIKit", + "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers", + "/System/Library/Frameworks/UserNotifications.framework/UserNotifications", + "/System/Library/Frameworks/UserNotificationsUI.framework/UserNotificationsUI", + "/System/Library/Frameworks/VideoSubscriberAccount.framework/VideoSubscriberAccount", + "/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox", + "/System/Library/Frameworks/Vision.framework/Vision", + "/System/Library/Frameworks/VisionKit.framework/VisionKit", + "/System/Library/Frameworks/WatchConnectivity.framework/WatchConnectivity", + "/System/Library/Frameworks/WebKit.framework/WebKit", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_iOS_Full = [ + "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", + "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", + "/System/Library/Frameworks/Foundation.framework/Foundation", + "/System/Library/Frameworks/GSS.framework/GSS", + "/System/Library/Frameworks/Security.framework/Security", + "/System/Library/Frameworks/UIKit.framework/UIKit", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_tvOS_None = [ + "/System/Library/Frameworks/Accelerate.framework/Accelerate", + "/System/Library/Frameworks/Accessibility.framework/Accessibility", + "/System/Library/Frameworks/AdSupport.framework/AdSupport", + "/System/Library/Frameworks/AppTrackingTransparency.framework/AppTrackingTransparency", + "/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox", + "/System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices", + "/System/Library/Frameworks/AVFoundation.framework/AVFoundation", + "/System/Library/Frameworks/AVKit.framework/AVKit", + "/System/Library/Frameworks/BackgroundTasks.framework/BackgroundTasks", + "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", + "/System/Library/Frameworks/Cinematic.framework/Cinematic", + "/System/Library/Frameworks/CloudKit.framework/CloudKit", + "/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth", + "/System/Library/Frameworks/CoreData.framework/CoreData", + "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", + "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics", + "/System/Library/Frameworks/CoreHaptics.framework/CoreHaptics", + "/System/Library/Frameworks/CoreImage.framework/CoreImage", + "/System/Library/Frameworks/CoreLocation.framework/CoreLocation", + "/System/Library/Frameworks/CoreMedia.framework/CoreMedia", + "/System/Library/Frameworks/CoreMIDI.framework/CoreMIDI", + "/System/Library/Frameworks/CoreML.framework/CoreML", + "/System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight", + "/System/Library/Frameworks/CoreText.framework/CoreText", + "/System/Library/Frameworks/CoreVideo.framework/CoreVideo", + "/System/Library/Frameworks/CryptoTokenKit.framework/CryptoTokenKit", + "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck", + "/System/Library/Frameworks/DeviceDiscoveryUI.framework/DeviceDiscoveryUI", + "/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory", + "/System/Library/Frameworks/Foundation.framework/Foundation", + "/System/Library/Frameworks/GameController.framework/GameController", + "/System/Library/Frameworks/GameKit.framework/GameKit", + "/System/Library/Frameworks/GameplayKit.framework/GameplayKit", + "/System/Library/Frameworks/GLKit.framework/GLKit", + "/System/Library/Frameworks/HomeKit.framework/HomeKit", + "/System/Library/Frameworks/ImageIO.framework/ImageIO", + "/System/Library/Frameworks/Intents.framework/Intents", + "/System/Library/Frameworks/IOSurface.framework/IOSurface", + "/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore", + "/System/Library/Frameworks/LinkPresentation.framework/LinkPresentation", + "/System/Library/Frameworks/MapKit.framework/MapKit", + "/System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility", + "/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer", + "/System/Library/Frameworks/MediaToolbox.framework/MediaToolbox", + "/System/Library/Frameworks/Metal.framework/Metal", + "/System/Library/Frameworks/MetalKit.framework/MetalKit", + "/System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders", + "/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/MetalPerformanceShadersGraph", + "/System/Library/Frameworks/MLCompute.framework/MLCompute", + "/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices", + "/System/Library/Frameworks/ModelIO.framework/ModelIO", + "/System/Library/Frameworks/MultipeerConnectivity.framework/MultipeerConnectivity", + "/System/Library/Frameworks/NaturalLanguage.framework/NaturalLanguage", + "/System/Library/Frameworks/Network.framework/Network", + "/System/Library/Frameworks/NetworkExtension.framework/NetworkExtension", + "/System/Library/Frameworks/OpenGLES.framework/OpenGLES", + "/System/Library/Frameworks/OSLog.framework/OSLog", + "/System/Library/Frameworks/PHASE.framework/PHASE", + "/System/Library/Frameworks/Photos.framework/Photos", + "/System/Library/Frameworks/PhotosUI.framework/PhotosUI", + "/System/Library/Frameworks/QuartzCore.framework/QuartzCore", + "/System/Library/Frameworks/ReplayKit.framework/ReplayKit", + "/System/Library/Frameworks/SceneKit.framework/SceneKit", + "/System/Library/Frameworks/Security.framework/Security", + "/System/Library/Frameworks/SharedWithYou.framework/SharedWithYou", + "/System/Library/Frameworks/ShazamKit.framework/ShazamKit", + "/System/Library/Frameworks/SoundAnalysis.framework/SoundAnalysis", + "/System/Library/Frameworks/SpriteKit.framework/SpriteKit", + "/System/Library/Frameworks/StoreKit.framework/StoreKit", + "/System/Library/Frameworks/Symbols.framework/Symbols", + "/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration", + "/System/Library/Frameworks/TVMLKit.framework/TVMLKit", + "/System/Library/Frameworks/TVServices.framework/TVServices", + "/System/Library/Frameworks/TVUIKit.framework/TVUIKit", + "/System/Library/Frameworks/UIKit.framework/UIKit", + "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers", + "/System/Library/Frameworks/UserNotifications.framework/UserNotifications", + "/System/Library/Frameworks/VideoSubscriberAccount.framework/VideoSubscriberAccount", + "/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox", + "/System/Library/Frameworks/Vision.framework/Vision", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_tvOS_Full = [ + "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", + "/System/Library/Frameworks/Foundation.framework/Foundation", + "/System/Library/Frameworks/Security.framework/Security", + "/System/Library/Frameworks/UIKit.framework/UIKit", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_macOS_None = [ + "@executable_path/../../Contents/MonoBundle/libclrgc.dylib", + "@executable_path/../../Contents/MonoBundle/libclrjit.dylib", + "@executable_path/../../Contents/MonoBundle/libcoreclr.dylib", + "@executable_path/../../Contents/MonoBundle/libhostfxr.dylib", + "@executable_path/../../Contents/MonoBundle/libhostpolicy.dylib", + "@executable_path/../../Contents/MonoBundle/libmscordaccore.dylib", + "@executable_path/../../Contents/MonoBundle/libmscordbi.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Globalization.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.IO.Compression.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Net.Security.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Security.Cryptography.Native.Apple.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Security.Cryptography.Native.OpenSsl.dylib", + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate", + "/System/Library/Frameworks/Accessibility.framework/Versions/A/Accessibility", + "/System/Library/Frameworks/Accounts.framework/Versions/A/Accounts", + "/System/Library/Frameworks/AdServices.framework/Versions/A/AdServices", + "/System/Library/Frameworks/AdSupport.framework/Versions/A/AdSupport", + "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit", + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices", + "/System/Library/Frameworks/AppTrackingTransparency.framework/Versions/A/AppTrackingTransparency", + "/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox", + "/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit", + "/System/Library/Frameworks/AuthenticationServices.framework/Versions/A/AuthenticationServices", + "/System/Library/Frameworks/AutomaticAssessmentConfiguration.framework/Versions/A/AutomaticAssessmentConfiguration", + "/System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation", + "/System/Library/Frameworks/AVKit.framework/Versions/A/AVKit", + "/System/Library/Frameworks/AVRouting.framework/Versions/A/AVRouting", + "/System/Library/Frameworks/BackgroundAssets.framework/Versions/A/BackgroundAssets", + "/System/Library/Frameworks/BusinessChat.framework/Versions/A/BusinessChat", + "/System/Library/Frameworks/CallKit.framework/Versions/A/CallKit", + "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork", + "/System/Library/Frameworks/Cinematic.framework/Versions/A/Cinematic", + "/System/Library/Frameworks/ClassKit.framework/Versions/A/ClassKit", + "/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit", + "/System/Library/Frameworks/Contacts.framework/Versions/A/Contacts", + "/System/Library/Frameworks/ContactsUI.framework/Versions/A/ContactsUI", + "/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio", + "/System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit", + "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth", + "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData", + "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", + "/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage", + "/System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation", + "/System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia", + "/System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI", + "/System/Library/Frameworks/CoreML.framework/Versions/A/CoreML", + "/System/Library/Frameworks/CoreMotion.framework/Versions/A/CoreMotion", + "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices", + "/System/Library/Frameworks/CoreSpotlight.framework/Versions/A/CoreSpotlight", + "/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText", + "/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo", + "/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN", + "/System/Library/Frameworks/CryptoTokenKit.framework/Versions/A/CryptoTokenKit", + "/System/Library/Frameworks/DeviceCheck.framework/Versions/A/DeviceCheck", + "/System/Library/Frameworks/DeviceDiscoveryExtension.framework/Versions/A/DeviceDiscoveryExtension", + "/System/Library/Frameworks/EventKit.framework/Versions/A/EventKit", + "/System/Library/Frameworks/ExecutionPolicy.framework/Versions/A/ExecutionPolicy", + "/System/Library/Frameworks/ExtensionKit.framework/Versions/A/ExtensionKit", + "/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory", + "/System/Library/Frameworks/FileProvider.framework/Versions/A/FileProvider", + "/System/Library/Frameworks/FileProviderUI.framework/Versions/A/FileProviderUI", + "/System/Library/Frameworks/FinderSync.framework/Versions/A/FinderSync", + "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation", + "/System/Library/Frameworks/GameController.framework/Versions/A/GameController", + "/System/Library/Frameworks/GameKit.framework/Versions/A/GameKit", + "/System/Library/Frameworks/GameplayKit.framework/Versions/A/GameplayKit", + "/System/Library/Frameworks/GLKit.framework/Versions/A/GLKit", + "/System/Library/Frameworks/HealthKit.framework/Versions/A/HealthKit", + "/System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/ImageCaptureCore", + "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO", + "/System/Library/Frameworks/Intents.framework/Versions/A/Intents", + "/System/Library/Frameworks/IntentsUI.framework/Versions/A/IntentsUI", + "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface", + "/System/Library/Frameworks/iTunesLibrary.framework/Versions/A/iTunesLibrary", + "/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore", + "/System/Library/Frameworks/LinkPresentation.framework/Versions/A/LinkPresentation", + "/System/Library/Frameworks/LocalAuthentication.framework/Versions/A/LocalAuthentication", + "/System/Library/Frameworks/LocalAuthenticationEmbeddedUI.framework/Versions/A/LocalAuthenticationEmbeddedUI", + "/System/Library/Frameworks/MailKit.framework/Versions/A/MailKit", + "/System/Library/Frameworks/MapKit.framework/Versions/A/MapKit", + "/System/Library/Frameworks/MediaAccessibility.framework/Versions/A/MediaAccessibility", + "/System/Library/Frameworks/MediaExtension.framework/Versions/A/MediaExtension", + "/System/Library/Frameworks/MediaLibrary.framework/Versions/A/MediaLibrary", + "/System/Library/Frameworks/MediaPlayer.framework/Versions/A/MediaPlayer", + "/System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox", + "/System/Library/Frameworks/Metal.framework/Versions/A/Metal", + "/System/Library/Frameworks/MetalFX.framework/Versions/A/MetalFX", + "/System/Library/Frameworks/MetalKit.framework/Versions/A/MetalKit", + "/System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders", + "/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Versions/A/MetalPerformanceShadersGraph", + "/System/Library/Frameworks/MetricKit.framework/Versions/A/MetricKit", + "/System/Library/Frameworks/MLCompute.framework/Versions/A/MLCompute", + "/System/Library/Frameworks/ModelIO.framework/Versions/A/ModelIO", + "/System/Library/Frameworks/MultipeerConnectivity.framework/Versions/A/MultipeerConnectivity", + "/System/Library/Frameworks/NaturalLanguage.framework/Versions/A/NaturalLanguage", + "/System/Library/Frameworks/Network.framework/Versions/A/Network", + "/System/Library/Frameworks/NetworkExtension.framework/Versions/A/NetworkExtension", + "/System/Library/Frameworks/NotificationCenter.framework/Versions/A/NotificationCenter", + "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL", + "/System/Library/Frameworks/OSLog.framework/Versions/A/OSLog", + "/System/Library/Frameworks/PassKit.framework/Versions/A/PassKit", + "/System/Library/Frameworks/PencilKit.framework/Versions/A/PencilKit", + "/System/Library/Frameworks/PHASE.framework/Versions/A/PHASE", + "/System/Library/Frameworks/Photos.framework/Versions/A/Photos", + "/System/Library/Frameworks/PhotosUI.framework/Versions/A/PhotosUI", + "/System/Library/Frameworks/PushKit.framework/Versions/A/PushKit", + "/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz", + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore", + "/System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook", + "/System/Library/Frameworks/QuickLookThumbnailing.framework/Versions/A/QuickLookThumbnailing", + "/System/Library/Frameworks/ReplayKit.framework/Versions/A/ReplayKit", + "/System/Library/Frameworks/SafariServices.framework/Versions/A/SafariServices", + "/System/Library/Frameworks/SafetyKit.framework/Versions/A/SafetyKit", + "/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit", + "/System/Library/Frameworks/ScreenCaptureKit.framework/Versions/A/ScreenCaptureKit", + "/System/Library/Frameworks/ScreenTime.framework/Versions/A/ScreenTime", + "/System/Library/Frameworks/ScriptingBridge.framework/Versions/A/ScriptingBridge", + "/System/Library/Frameworks/Security.framework/Versions/A/Security", + "/System/Library/Frameworks/SensitiveContentAnalysis.framework/Versions/A/SensitiveContentAnalysis", + "/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement", + "/System/Library/Frameworks/SharedWithYou.framework/Versions/A/SharedWithYou", + "/System/Library/Frameworks/SharedWithYouCore.framework/Versions/A/SharedWithYouCore", + "/System/Library/Frameworks/ShazamKit.framework/Versions/A/ShazamKit", + "/System/Library/Frameworks/Social.framework/Versions/A/Social", + "/System/Library/Frameworks/SoundAnalysis.framework/Versions/A/SoundAnalysis", + "/System/Library/Frameworks/Speech.framework/Versions/A/Speech", + "/System/Library/Frameworks/SpriteKit.framework/Versions/A/SpriteKit", + "/System/Library/Frameworks/StoreKit.framework/Versions/A/StoreKit", + "/System/Library/Frameworks/Symbols.framework/Versions/A/Symbols", + "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration", + "/System/Library/Frameworks/ThreadNetwork.framework/Versions/A/ThreadNetwork", + "/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers", + "/System/Library/Frameworks/UserNotifications.framework/Versions/A/UserNotifications", + "/System/Library/Frameworks/UserNotificationsUI.framework/Versions/A/UserNotificationsUI", + "/System/Library/Frameworks/VideoSubscriberAccount.framework/Versions/A/VideoSubscriberAccount", + "/System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox", + "/System/Library/Frameworks/Vision.framework/Versions/A/Vision", + "/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_macOS_Full = [ + "@executable_path/../../Contents/MonoBundle/libclrgc.dylib", + "@executable_path/../../Contents/MonoBundle/libclrjit.dylib", + "@executable_path/../../Contents/MonoBundle/libcoreclr.dylib", + "@executable_path/../../Contents/MonoBundle/libhostfxr.dylib", + "@executable_path/../../Contents/MonoBundle/libhostpolicy.dylib", + "@executable_path/../../Contents/MonoBundle/libmscordaccore.dylib", + "@executable_path/../../Contents/MonoBundle/libmscordbi.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Globalization.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.IO.Compression.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Net.Security.Native.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Security.Cryptography.Native.Apple.dylib", + "@executable_path/../../Contents/MonoBundle/libSystem.Security.Cryptography.Native.OpenSsl.dylib", + "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit", + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices", + "/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit", + "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData", + "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", + "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation", + "/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz", + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore", + "/System/Library/Frameworks/Security.framework/Versions/A/Security", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_MacCatalyst_None = [ + "/System/iOSSupport/System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook", + "/System/iOSSupport/System/Library/Frameworks/AppClip.framework/Versions/A/AppClip", + "/System/iOSSupport/System/Library/Frameworks/AuthenticationServices.framework/Versions/A/AuthenticationServices", + "/System/iOSSupport/System/Library/Frameworks/AVKit.framework/Versions/A/AVKit", + "/System/iOSSupport/System/Library/Frameworks/BusinessChat.framework/Versions/A/BusinessChat", + "/System/iOSSupport/System/Library/Frameworks/ContactsUI.framework/Versions/A/ContactsUI", + "/System/iOSSupport/System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit", + "/System/iOSSupport/System/Library/Frameworks/CoreLocationUI.framework/Versions/A/CoreLocationUI", + "/System/iOSSupport/System/Library/Frameworks/CoreNFC.framework/Versions/A/CoreNFC", + "/System/iOSSupport/System/Library/Frameworks/EventKitUI.framework/Versions/A/EventKitUI", + "/System/iOSSupport/System/Library/Frameworks/GameController.framework/Versions/A/GameController", + "/System/iOSSupport/System/Library/Frameworks/GameKit.framework/Versions/A/GameKit", + "/System/iOSSupport/System/Library/Frameworks/GameplayKit.framework/Versions/A/GameplayKit", + "/System/iOSSupport/System/Library/Frameworks/HealthKitUI.framework/Versions/A/HealthKitUI", + "/System/iOSSupport/System/Library/Frameworks/HomeKit.framework/Versions/A/HomeKit", + "/System/iOSSupport/System/Library/Frameworks/IdentityLookupUI.framework/Versions/A/IdentityLookupUI", + "/System/iOSSupport/System/Library/Frameworks/IntentsUI.framework/Versions/A/IntentsUI", + "/System/iOSSupport/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore", + "/System/iOSSupport/System/Library/Frameworks/LinkPresentation.framework/Versions/A/LinkPresentation", + "/System/iOSSupport/System/Library/Frameworks/MapKit.framework/Versions/A/MapKit", + "/System/iOSSupport/System/Library/Frameworks/MediaPlayer.framework/Versions/A/MediaPlayer", + "/System/iOSSupport/System/Library/Frameworks/Messages.framework/Versions/A/Messages", + "/System/iOSSupport/System/Library/Frameworks/MessageUI.framework/Versions/A/MessageUI", + "/System/iOSSupport/System/Library/Frameworks/MetalKit.framework/Versions/A/MetalKit", + "/System/iOSSupport/System/Library/Frameworks/MobileCoreServices.framework/Versions/A/MobileCoreServices", + "/System/iOSSupport/System/Library/Frameworks/MultipeerConnectivity.framework/Versions/A/MultipeerConnectivity", + "/System/iOSSupport/System/Library/Frameworks/PassKit.framework/Versions/A/PassKit", + "/System/iOSSupport/System/Library/Frameworks/PDFKit.framework/Versions/A/PDFKit", + "/System/iOSSupport/System/Library/Frameworks/PencilKit.framework/Versions/A/PencilKit", + "/System/iOSSupport/System/Library/Frameworks/PhotosUI.framework/Versions/A/PhotosUI", + "/System/iOSSupport/System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook", + "/System/iOSSupport/System/Library/Frameworks/ReplayKit.framework/Versions/A/ReplayKit", + "/System/iOSSupport/System/Library/Frameworks/SafariServices.framework/Versions/A/SafariServices", + "/System/iOSSupport/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit", + "/System/iOSSupport/System/Library/Frameworks/ScreenTime.framework/Versions/A/ScreenTime", + "/System/iOSSupport/System/Library/Frameworks/SharedWithYou.framework/Versions/A/SharedWithYou", + "/System/iOSSupport/System/Library/Frameworks/Social.framework/Versions/A/Social", + "/System/iOSSupport/System/Library/Frameworks/SpriteKit.framework/Versions/A/SpriteKit", + "/System/iOSSupport/System/Library/Frameworks/StoreKit.framework/Versions/A/StoreKit", + "/System/iOSSupport/System/Library/Frameworks/UIKit.framework/Versions/A/UIKit", + "/System/iOSSupport/System/Library/Frameworks/UserNotificationsUI.framework/Versions/A/UserNotificationsUI", + "/System/iOSSupport/System/Library/Frameworks/VisionKit.framework/Versions/A/VisionKit", + "/System/iOSSupport/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit", + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate", + "/System/Library/Frameworks/Accessibility.framework/Versions/A/Accessibility", + "/System/Library/Frameworks/Accounts.framework/Versions/A/Accounts", + "/System/Library/Frameworks/AdServices.framework/Versions/A/AdServices", + "/System/Library/Frameworks/AdSupport.framework/Versions/A/AdSupport", + "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit", + "/System/Library/Frameworks/AppTrackingTransparency.framework/Versions/A/AppTrackingTransparency", + "/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox", + "/System/Library/Frameworks/AutomaticAssessmentConfiguration.framework/Versions/A/AutomaticAssessmentConfiguration", + "/System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation", + "/System/Library/Frameworks/AVRouting.framework/Versions/A/AVRouting", + "/System/Library/Frameworks/BackgroundAssets.framework/Versions/A/BackgroundAssets", + "/System/Library/Frameworks/BackgroundTasks.framework/Versions/A/BackgroundTasks", + "/System/Library/Frameworks/CallKit.framework/Versions/A/CallKit", + "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork", + "/System/Library/Frameworks/ClassKit.framework/Versions/A/ClassKit", + "/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit", + "/System/Library/Frameworks/Contacts.framework/Versions/A/Contacts", + "/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio", + "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth", + "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData", + "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", + "/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics", + "/System/Library/Frameworks/CoreHaptics.framework/Versions/A/CoreHaptics", + "/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage", + "/System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation", + "/System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia", + "/System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI", + "/System/Library/Frameworks/CoreML.framework/Versions/A/CoreML", + "/System/Library/Frameworks/CoreMotion.framework/Versions/A/CoreMotion", + "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices", + "/System/Library/Frameworks/CoreSpotlight.framework/Versions/A/CoreSpotlight", + "/System/Library/Frameworks/CoreTelephony.framework/Versions/A/CoreTelephony", + "/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText", + "/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo", + "/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN", + "/System/Library/Frameworks/CryptoTokenKit.framework/Versions/A/CryptoTokenKit", + "/System/Library/Frameworks/DeviceCheck.framework/Versions/A/DeviceCheck", + "/System/Library/Frameworks/DeviceDiscoveryExtension.framework/Versions/A/DeviceDiscoveryExtension", + "/System/Library/Frameworks/EventKit.framework/Versions/A/EventKit", + "/System/Library/Frameworks/ExecutionPolicy.framework/Versions/A/ExecutionPolicy", + "/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory", + "/System/Library/Frameworks/FileProvider.framework/Versions/A/FileProvider", + "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation", + "/System/Library/Frameworks/GSS.framework/Versions/A/GSS", + "/System/Library/Frameworks/HealthKit.framework/Versions/A/HealthKit", + "/System/Library/Frameworks/IdentityLookup.framework/Versions/A/IdentityLookup", + "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO", + "/System/Library/Frameworks/Intents.framework/Versions/A/Intents", + "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface", + "/System/Library/Frameworks/LocalAuthentication.framework/Versions/A/LocalAuthentication", + "/System/Library/Frameworks/MediaAccessibility.framework/Versions/A/MediaAccessibility", + "/System/Library/Frameworks/MediaToolbox.framework/Versions/A/MediaToolbox", + "/System/Library/Frameworks/Metal.framework/Versions/A/Metal", + "/System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders", + "/System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Versions/A/MetalPerformanceShadersGraph", + "/System/Library/Frameworks/MetricKit.framework/Versions/A/MetricKit", + "/System/Library/Frameworks/MLCompute.framework/Versions/A/MLCompute", + "/System/Library/Frameworks/ModelIO.framework/Versions/A/ModelIO", + "/System/Library/Frameworks/NaturalLanguage.framework/Versions/A/NaturalLanguage", + "/System/Library/Frameworks/NearbyInteraction.framework/Versions/A/NearbyInteraction", + "/System/Library/Frameworks/Network.framework/Versions/A/Network", + "/System/Library/Frameworks/NetworkExtension.framework/Versions/A/NetworkExtension", + "/System/Library/Frameworks/OSLog.framework/Versions/A/OSLog", + "/System/Library/Frameworks/PHASE.framework/Versions/A/PHASE", + "/System/Library/Frameworks/Photos.framework/Versions/A/Photos", + "/System/Library/Frameworks/PushKit.framework/Versions/A/PushKit", + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore", + "/System/Library/Frameworks/QuickLookThumbnailing.framework/Versions/A/QuickLookThumbnailing", + "/System/Library/Frameworks/Security.framework/Versions/A/Security", + "/System/Library/Frameworks/SensitiveContentAnalysis.framework/Versions/A/SensitiveContentAnalysis", + "/System/Library/Frameworks/SensorKit.framework/Versions/A/SensorKit", + "/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement", + "/System/Library/Frameworks/SharedWithYouCore.framework/Versions/A/SharedWithYouCore", + "/System/Library/Frameworks/ShazamKit.framework/Versions/A/ShazamKit", + "/System/Library/Frameworks/SoundAnalysis.framework/Versions/A/SoundAnalysis", + "/System/Library/Frameworks/Speech.framework/Versions/A/Speech", + "/System/Library/Frameworks/Symbols.framework/Versions/A/Symbols", + "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration", + "/System/Library/Frameworks/ThreadNetwork.framework/Versions/A/ThreadNetwork", + "/System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers", + "/System/Library/Frameworks/UserNotifications.framework/Versions/A/UserNotifications", + "/System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox", + "/System/Library/Frameworks/Vision.framework/Versions/A/Vision", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string[] expectedFrameworks_MacCatalyst_Full = [ + "/System/iOSSupport/System/Library/Frameworks/UIKit.framework/Versions/A/UIKit", + "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit", + "/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit", + "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData", + "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", + "/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics", + "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation", + "/System/Library/Frameworks/GSS.framework/Versions/A/GSS", + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore", + "/System/Library/Frameworks/Security.framework/Versions/A/Security", + "/usr/lib/libc++.1.dylib", + "/usr/lib/libcompression.dylib", + "/usr/lib/libiconv.2.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static IEnumerable GetLinkedWithNativeLibrariesTestCases () + { + // Generally speaking, whenever we bind a new framework, we'll have to adjust the LinkMode="None" test cases, + // but we shouldn't have to adjust the LinkMode="Full" test cases (which would typically mean that we'll end + // up linking with said framework in every app - it's also an indication that we're not trimming away as much + // as we want, because just adding an (unused) framework shouldn't make it impossible to trim away all the + // code in that framework). + + yield return new TestCaseData (ApplePlatform.iOS, "ios-arm64", "None", expectedFrameworks_iOS_None); + yield return new TestCaseData (ApplePlatform.iOS, "ios-arm64", "Full", expectedFrameworks_iOS_Full); + yield return new TestCaseData (ApplePlatform.TVOS, "tvos-arm64", "None", expectedFrameworks_tvOS_None); + yield return new TestCaseData (ApplePlatform.TVOS, "tvos-arm64", "Full", expectedFrameworks_tvOS_Full); + yield return new TestCaseData (ApplePlatform.MacOSX, "osx-arm64", "None", expectedFrameworks_macOS_None); + yield return new TestCaseData (ApplePlatform.MacOSX, "osx-arm64", "Full", expectedFrameworks_macOS_Full); + yield return new TestCaseData (ApplePlatform.MacCatalyst, "maccatalyst-x64", "None", expectedFrameworks_MacCatalyst_None); + yield return new TestCaseData (ApplePlatform.MacCatalyst, "maccatalyst-x64", "Full", expectedFrameworks_MacCatalyst_Full); + } + + [TestCaseSource (nameof (GetLinkedWithNativeLibrariesTestCases))] + public void LinkedWithNativeLibraries (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string[] expectedFrameworks) + { + var project = "MySimpleApp"; + Configuration.IgnoreIfIgnoredPlatform (platform); + Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers); + + var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath); + Clean (project_path); + var properties = GetDefaultProperties (runtimeIdentifiers); + properties ["MtouchLink"] = linkMode; + properties ["LinkMode"] = linkMode; + if (platform != ApplePlatform.MacOSX) + properties ["UseInterpreter"] = "true"; // just to speed up the build + DotNet.AssertBuild (project_path, properties); + + var appExecutable = GetNativeExecutable (platform, appPath); + var actualFrameworks = GetLinkedWithFrameworks (appExecutable); + CollectionAssert.AreEquivalent ( + expectedFrameworks.OrderBy (v => v).ToArray (), + actualFrameworks.OrderBy (v => v).ToArray (), + "Frameworks"); + } + + static HashSet GetLinkedWithFrameworks (string path) + { + var rv = new HashSet (); + foreach (var file in MachO.Read (path)) { + foreach (var lc in file.load_commands) { + if (lc is DylibLoadCommand loadCommand) { + rv.Add (loadCommand.name); + } + } + } + return rv; + } } } From 9a41ed81688a0c1b9eb2e03d273fb5f25029bc0c Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Mon, 30 Sep 2024 19:32:21 +0000 Subject: [PATCH 2/3] Auto-format source code --- tests/dotnet/UnitTests/ProjectTest.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 6a5a0807e32b..5a7bac5c218d 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2072,7 +2072,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl DotNet.AssertBuild (project_path, properties); } - static string[] expectedFrameworks_iOS_None = [ + static string [] expectedFrameworks_iOS_None = [ "/System/Library/Frameworks/Accelerate.framework/Accelerate", "/System/Library/Frameworks/Accessibility.framework/Accessibility", "/System/Library/Frameworks/AccessorySetupKit.framework/AccessorySetupKit", @@ -2218,7 +2218,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_iOS_Full = [ + static string [] expectedFrameworks_iOS_Full = [ "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", "/System/Library/Frameworks/Foundation.framework/Foundation", @@ -2233,7 +2233,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_tvOS_None = [ + static string [] expectedFrameworks_tvOS_None = [ "/System/Library/Frameworks/Accelerate.framework/Accelerate", "/System/Library/Frameworks/Accessibility.framework/Accessibility", "/System/Library/Frameworks/AdSupport.framework/AdSupport", @@ -2322,7 +2322,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_tvOS_Full = [ + static string [] expectedFrameworks_tvOS_Full = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", "/System/Library/Frameworks/Foundation.framework/Foundation", "/System/Library/Frameworks/Security.framework/Security", @@ -2335,7 +2335,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_macOS_None = [ + static string [] expectedFrameworks_macOS_None = [ "@executable_path/../../Contents/MonoBundle/libclrgc.dylib", "@executable_path/../../Contents/MonoBundle/libclrjit.dylib", "@executable_path/../../Contents/MonoBundle/libcoreclr.dylib", @@ -2483,7 +2483,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_macOS_Full = [ + static string [] expectedFrameworks_macOS_Full = [ "@executable_path/../../Contents/MonoBundle/libclrgc.dylib", "@executable_path/../../Contents/MonoBundle/libclrjit.dylib", "@executable_path/../../Contents/MonoBundle/libcoreclr.dylib", @@ -2514,7 +2514,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_MacCatalyst_None = [ + static string [] expectedFrameworks_MacCatalyst_None = [ "/System/iOSSupport/System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook", "/System/iOSSupport/System/Library/Frameworks/AppClip.framework/Versions/A/AppClip", "/System/iOSSupport/System/Library/Frameworks/AuthenticationServices.framework/Versions/A/AuthenticationServices", @@ -2650,7 +2650,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string[] expectedFrameworks_MacCatalyst_Full = [ + static string [] expectedFrameworks_MacCatalyst_Full = [ "/System/iOSSupport/System/Library/Frameworks/UIKit.framework/Versions/A/UIKit", "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit", "/System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit", @@ -2688,7 +2688,7 @@ static IEnumerable GetLinkedWithNativeLibrariesTestCases () } [TestCaseSource (nameof (GetLinkedWithNativeLibrariesTestCases))] - public void LinkedWithNativeLibraries (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string[] expectedFrameworks) + public void LinkedWithNativeLibraries (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string [] expectedFrameworks) { var project = "MySimpleApp"; Configuration.IgnoreIfIgnoredPlatform (platform); From fea53b04e61b320a1564e86a2e51c934782f076e Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 1 Oct 2024 10:42:10 +0200 Subject: [PATCH 3/3] Introspection should link with BrowserEngineKit. --- tests/introspection/dotnet/iOS/introspection.csproj | 2 ++ tests/introspection/dotnet/macOS/introspection.csproj | 2 ++ tests/introspection/dotnet/tvOS/introspection.csproj | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/introspection/dotnet/iOS/introspection.csproj b/tests/introspection/dotnet/iOS/introspection.csproj index 6bd13ee186cf..8aec236aa0ab 100644 --- a/tests/introspection/dotnet/iOS/introspection.csproj +++ b/tests/introspection/dotnet/iOS/introspection.csproj @@ -2,6 +2,8 @@ net$(BundledNETCoreAppTargetFrameworkVersion)-ios + + true diff --git a/tests/introspection/dotnet/macOS/introspection.csproj b/tests/introspection/dotnet/macOS/introspection.csproj index 29307a09fef5..3a187c9a8bd6 100644 --- a/tests/introspection/dotnet/macOS/introspection.csproj +++ b/tests/introspection/dotnet/macOS/introspection.csproj @@ -2,6 +2,8 @@ net$(BundledNETCoreAppTargetFrameworkVersion)-macos + + true diff --git a/tests/introspection/dotnet/tvOS/introspection.csproj b/tests/introspection/dotnet/tvOS/introspection.csproj index e3d65c592a4e..b0232ed33cc2 100644 --- a/tests/introspection/dotnet/tvOS/introspection.csproj +++ b/tests/introspection/dotnet/tvOS/introspection.csproj @@ -2,6 +2,8 @@ net$(BundledNETCoreAppTargetFrameworkVersion)-tvos + + true