From 1e64a22bb7fdb6a0fc4ab4ecc47814b895ef56a3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 31 Mar 2026 16:30:30 +0200 Subject: [PATCH 01/25] [net11.0] Make CoreCLR the default runtime. --- dotnet/targets/Xamarin.Shared.Sdk.props | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index eb8b64279a91..a618590911c8 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -37,9 +37,7 @@ --> <_UseNativeAot Condition="'$(PublishAot)' == 'true' And '$(_IsPublishing)' == 'true'">true - false - false - true + false $(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)Microsoft.$(_PlatformName).Sdk.targets From 164df35cc03574d992cdfda359afdcbb976b5e29 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 1 Apr 2026 17:10:58 +0200 Subject: [PATCH 02/25] [tests] Update the BuildStructure test to test both CoreCLR + MonoVM. --- tests/dotnet/UnitTests/BundleStructureTest.cs | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/dotnet/UnitTests/BundleStructureTest.cs b/tests/dotnet/UnitTests/BundleStructureTest.cs index 035e665fd8d6..38bb2e620d5c 100644 --- a/tests/dotnet/UnitTests/BundleStructureTest.cs +++ b/tests/dotnet/UnitTests/BundleStructureTest.cs @@ -611,6 +611,22 @@ public enum CodeSignature { All, } + [Test] + // Debug + [TestCase (ApplePlatform.iOS, "ios-arm64", CodeSignature.All, "Debug")] + [TestCase (ApplePlatform.iOS, "iossimulator-x64", CodeSignature.All, "Debug")] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64", CodeSignature.All, "Debug")] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64;maccatalyst-arm64", CodeSignature.All, "Debug")] + [TestCase (ApplePlatform.TVOS, "tvos-arm64", CodeSignature.All, "Debug")] + // Release + [TestCase (ApplePlatform.iOS, "ios-arm64", CodeSignature.All, "Release")] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64;maccatalyst-arm64", CodeSignature.All, "Release")] + [TestCase (ApplePlatform.TVOS, "tvos-arm64", CodeSignature.All, "Release")] + public void Build_Mono (ApplePlatform platform, string runtimeIdentifiers, CodeSignature signature, string configuration) + { + Build (platform, runtimeIdentifiers, signature, configuration, true); + } + [Test] // Debug [TestCase (ApplePlatform.iOS, "ios-arm64", CodeSignature.All, "Debug")] @@ -625,7 +641,12 @@ public enum CodeSignature { [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64;maccatalyst-arm64", CodeSignature.All, "Release")] [TestCase (ApplePlatform.MacOSX, "osx-x64", CodeSignature.All, "Release")] [TestCase (ApplePlatform.TVOS, "tvos-arm64", CodeSignature.All, "Release")] - public void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature signature, string configuration) + public void Build_CoreCLR (ApplePlatform platform, string runtimeIdentifiers, CodeSignature signature, string configuration) + { + Build (platform, runtimeIdentifiers, signature, configuration, false); + } + + void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature signature, string configuration, bool useMonoRuntime) { var project = "BundleStructure"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -639,6 +660,7 @@ public void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignat properties ["_IsAppSigned"] = signature != CodeSignature.None ? "true" : "false"; if (!string.IsNullOrWhiteSpace (configuration)) properties ["Configuration"] = configuration; + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; var rv = DotNet.AssertBuild (project_path, properties); var warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).ToArray (); var warningMessages = FilterWarnings (warnings); From 79dc8336d09c5f6cc11b2465c7c854b09de19cc4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 1 Apr 2026 18:59:03 +0200 Subject: [PATCH 03/25] [tests] Fix BundleStructureTest CoreCLR variations. Update CheckAppBundleContents to accept an isCoreCLR parameter so it can correctly filter CoreCLR-specific runtime files on all platforms (not just macOS). This includes: - CoreCLR/Mono dylib filtering based on isCoreCLR instead of platform - Framework-packaged native libraries on iOS/tvOS (libcoreclr.framework, etc.) - R2R compiled app artifacts (.r2r.dylib, BundleStructure.framework) - libxamarin-dotnet-coreclr bridge libraries - Per-rid assembly layout for CoreCLR on MacCatalyst multi-rid builds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/BundleStructureTest.cs | 56 +++++++++++++------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/tests/dotnet/UnitTests/BundleStructureTest.cs b/tests/dotnet/UnitTests/BundleStructureTest.cs index 38bb2e620d5c..0c27d20d73b1 100644 --- a/tests/dotnet/UnitTests/BundleStructureTest.cs +++ b/tests/dotnet/UnitTests/BundleStructureTest.cs @@ -46,23 +46,22 @@ public static List Find (string appPath) return allFiles; } - internal static void CheckAppBundleContents (ApplePlatform platform, string appPath, string [] runtimeIdentifiers, CodeSignature isSigned, bool isReleaseBuild) + internal static void CheckAppBundleContents (ApplePlatform platform, string appPath, string [] runtimeIdentifiers, CodeSignature isSigned, bool isReleaseBuild, bool isCoreCLR = false) { Console.WriteLine ($"App bundle: {appPath}"); Assert.That (appPath, Does.Exist, "App bundle existence"); var allFiles = Find (appPath); - CheckAppBundleContents (platform, allFiles, runtimeIdentifiers, isSigned, isReleaseBuild, appPath); + CheckAppBundleContents (platform, allFiles, runtimeIdentifiers, isSigned, isReleaseBuild, appPath, isCoreCLR: isCoreCLR); } - internal static void CheckZippedAppBundleContents (ApplePlatform platform, string zippedApp, string [] runtimeIdentifiers, CodeSignature isSigned, bool isReleaseBuild) + internal static void CheckZippedAppBundleContents (ApplePlatform platform, string zippedApp, string [] runtimeIdentifiers, CodeSignature isSigned, bool isReleaseBuild, bool isCoreCLR = false) { var allFiles = ZipHelpers.List (zippedApp); - CheckAppBundleContents (platform, allFiles, runtimeIdentifiers, isSigned, isReleaseBuild, null); + CheckAppBundleContents (platform, allFiles, runtimeIdentifiers, isSigned, isReleaseBuild, null, isCoreCLR: isCoreCLR); } - internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable allFiles, string [] runtimeIdentifiers, CodeSignature isSigned, bool isReleaseBuild, string? appPath = null) + internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable allFiles, string [] runtimeIdentifiers, CodeSignature isSigned, bool isReleaseBuild, string? appPath = null, bool isCoreCLR = false) { - var isCoreCLR = platform == ApplePlatform.MacOSX; var includeDebugFiles = !isReleaseBuild; // Remove various files we don't care about (for this test) from the list of files in the app bundle. @@ -79,13 +78,13 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable case "libhostpolicy.dylib": case "libmscordaccore.dylib": case "libmscordbi.dylib": - return platform == ApplePlatform.MacOSX; + return isCoreCLR; case "libmono-component-debugger.dylib": case "libmono-component-diagnostics_tracing.dylib": case "libmono-component-hot_reload.dylib": case "libmono-component-marshal-ilgen.dylib": case "libmonosgen-2.0.dylib": - return platform != ApplePlatform.MacOSX; + return !isCoreCLR; case "libSystem.Native.dylib": case "libSystem.Net.Security.Native.dylib": case "libSystem.Globalization.Native.dylib": @@ -96,6 +95,8 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable case "netstandard.dll": case "libxamarin-dotnet-debug.dylib": case "libxamarin-dotnet.dylib": + case "libxamarin-dotnet-coreclr-debug.dylib": + case "libxamarin-dotnet-coreclr.dylib": return true; case "embedded.mobileprovision": @@ -113,7 +114,25 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable return true; if (fn.StartsWith ("libSystem.", StringComparison.Ordinal) && fn.EndsWith (".dylib", StringComparison.Ordinal)) - return platform == ApplePlatform.MacOSX; + return isCoreCLR; + + if (isCoreCLR) { + // R2R compiled dylib (macOS/MacCatalyst) + if (fn.EndsWith (".r2r.dylib", StringComparison.Ordinal)) + return true; + + // On iOS/tvOS, CoreCLR packages native libraries as .framework bundles. + // Filter framework entries where the framework name starts with "lib" + // (these are runtime native libraries like libcoreclr, libSystem.Native, etc.) + // and the app's R2R framework (BundleStructure.framework). + if (v!.Contains (".framework")) { + var fwIdx = v.IndexOf (".framework", StringComparison.Ordinal); + var slashIdx = fwIdx > 0 ? v.LastIndexOf ('/', fwIdx - 1) : -1; + var frameworkName = v.Substring (slashIdx + 1, fwIdx - slashIdx - 1); + if (frameworkName.StartsWith ("lib", StringComparison.Ordinal) || frameworkName == "BundleStructure") + return true; + } + } return false; }; @@ -275,7 +294,7 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable expectedFiles.Add (Path.Combine (resourcesDirectory, "SubDirectory")); expectedFiles.Add (Path.Combine (resourcesDirectory, "SubDirectory", "AutoIncluded2.txt")); - expectedFiles.Add (Path.Combine (assemblyDirectory, "FrameworksInRuntimesNativeDirectory.dll")); + AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "FrameworksInRuntimesNativeDirectory", runtimeIdentifiers, forceSingleRid: !isCoreCLR || platform == ApplePlatform.MacOSX); AddExpectedFrameworkFiles (platform, expectedFiles, "FrameworksInRuntimesNativeDirectory1", isSigned); AddExpectedFrameworkFiles (platform, expectedFiles, "FrameworksInRuntimesNativeDirectory2", isSigned); @@ -307,10 +326,10 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable // misc other files not directly related to the test itself AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "BundleStructure", runtimeIdentifiers, addConfig: true, includeDebugFiles: includeDebugFiles); if (platform != ApplePlatform.MacOSX) - AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "MonoTouch.Dialog", runtimeIdentifiers, forceSingleRid: (platform == ApplePlatform.MacCatalyst && !isReleaseBuild), includeDebugFiles: includeDebugFiles); - expectedFiles.Add (Path.Combine (assemblyDirectory, "nunit.framework.dll")); - expectedFiles.Add (Path.Combine (assemblyDirectory, "nunitlite.dll")); - expectedFiles.Add (Path.Combine (assemblyDirectory, "Mono.Options.dll")); + AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "MonoTouch.Dialog", runtimeIdentifiers, forceSingleRid: (platform == ApplePlatform.MacCatalyst && !isReleaseBuild && !isCoreCLR), includeDebugFiles: includeDebugFiles); + AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "nunit.framework", runtimeIdentifiers, forceSingleRid: !isCoreCLR || platform == ApplePlatform.MacOSX); + AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "nunitlite", runtimeIdentifiers, forceSingleRid: !isCoreCLR || platform == ApplePlatform.MacOSX); + AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "Mono.Options", runtimeIdentifiers, forceSingleRid: !isCoreCLR || platform == ApplePlatform.MacOSX); AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "Touch.Client", runtimeIdentifiers, platform == ApplePlatform.MacOSX || (platform == ApplePlatform.MacCatalyst && !isReleaseBuild), includeDebugFiles: includeDebugFiles); AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, Path.GetFileNameWithoutExtension (Configuration.GetBaseLibraryName (platform)), runtimeIdentifiers, platform == ApplePlatform.MacOSX, includeDebugFiles: includeDebugFiles); expectedFiles.Add (Path.Combine (assemblyDirectory, "runtimeconfig.bin")); @@ -698,8 +717,9 @@ void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature sig .ToList (); var appExecutable = GetNativeExecutable (platform, appPath); + var isCoreCLR = !useMonoRuntime; - CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild); + CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild, isCoreCLR: isCoreCLR); CollectionAssert.AreEqual (expectedWarnings, warningMessages, "Warnings"); ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); @@ -711,7 +731,7 @@ void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature sig warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).ToArray (); warningMessages = FilterWarnings (warnings); - CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild); + CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild, isCoreCLR: isCoreCLR); CollectionAssert.AreEqual (expectedWarnings, warningMessages, "Warnings Rebuild 1"); ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); @@ -723,7 +743,7 @@ void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature sig warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).ToArray (); warningMessages = FilterWarnings (warnings); - CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild); + CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild, isCoreCLR: isCoreCLR); CollectionAssert.AreEqual (expectedWarnings, warningMessages, "Warnings Rebuild 2"); ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); @@ -732,7 +752,7 @@ void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature sig warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).ToArray (); warningMessages = FilterWarnings (warnings); - CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild); + CheckAppBundleContents (platform, appPath, rids, signature, isReleaseBuild, isCoreCLR: isCoreCLR); CollectionAssert.AreEqual (expectedWarnings, warningMessages, "Warnings Rebuild 3"); ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); } From 9859bc9f047b3475ef96d9fd68ce31533f2d1fc7 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 13:23:12 +0200 Subject: [PATCH 04/25] [runtime] Build extension libs for CoreCLR for all platforms. --- runtime/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/Makefile b/runtime/Makefile index 6fb1906925aa..d2f1d2c30eb1 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -93,8 +93,8 @@ MONOTOUCH_ARM64_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_ARM64_ # .NET # -DOTNET_iOS_LIBRARIES = libextension-dotnet.a -DOTNET_tvOS_LIBRARIES = libextension-dotnet.a libtvextension-dotnet.a +DOTNET_iOS_LIBRARIES = libextension-dotnet.a libextension-dotnet-coreclr.a +DOTNET_tvOS_LIBRARIES = libextension-dotnet.a libtvextension-dotnet.a libextension-dotnet-coreclr.a libtvextension-dotnet-coreclr.a DOTNET_macOS_LIBRARIES = libextension-dotnet-coreclr.a DOTNET_MacCatalyst_LIBRARIES = From 1d9c1fe3f66fd4b744a77a8d594bc433d7c04038 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 13:36:26 +0200 Subject: [PATCH 05/25] [tests] Update the CustomizedCodeSigning to test both CoreCLR + MonoVM. --- tests/dotnet/UnitTests/ProjectTest.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index cc905239f71c..a385852b33f3 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2255,9 +2255,11 @@ internal static void PluralRuntimeIdentifiersImpl (ApplePlatform platform, strin DotNet.AssertBuild (project_path, properties); } - [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64")] - [TestCase (ApplePlatform.iOS, "ios-arm64")] - public void CustomizedCodeSigning (ApplePlatform platform, string runtimeIdentifiers) + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64", true)] + [TestCase (ApplePlatform.iOS, "ios-arm64", true)] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64", false)] + [TestCase (ApplePlatform.iOS, "ios-arm64", false)] + public void CustomizedCodeSigning (ApplePlatform platform, string runtimeIdentifiers, bool useMonoRuntime) { var project = "CustomizedCodeSigning"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -2265,6 +2267,8 @@ public void CustomizedCodeSigning (ApplePlatform platform, string runtimeIdentif var properties = GetDefaultProperties (runtimeIdentifiers); var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath); + properties ["UseMonoRuntime"] = useMonoRuntime ? "true": "true"; + Clean (project_path); DotNet.AssertBuild (project_path, properties); From c3e304fa2c542f068bf84b057cf62d5601cd3493 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 14:11:45 +0200 Subject: [PATCH 06/25] [tests] Fix CustomizedCodeSigning CoreCLR variations. Fix a typo where UseMonoRuntime was always set to 'true' regardless of the useMonoRuntime parameter, so CoreCLR tests were never actually testing CoreCLR. Update assertions for CoreCLR: - Filter out .framework/_CodeSignature entries from the 'no other signed app bundles' check - on iOS/tvOS, CoreCLR packages native runtime libraries as signed .framework bundles. - Exclude dylibs directly in the assembly directory from the 'must be unsigned' check - on macOS/MacCatalyst, CoreCLR native runtime dylibs (libcoreclr.dylib, libSystem.*.dylib, etc.) are signed and should not be part of the customized code signing assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/ProjectTest.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index a385852b33f3..cdee47306dd1 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2267,7 +2267,7 @@ public void CustomizedCodeSigning (ApplePlatform platform, string runtimeIdentif var properties = GetDefaultProperties (runtimeIdentifiers); var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath); - properties ["UseMonoRuntime"] = useMonoRuntime ? "true": "true"; + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; Clean (project_path); DotNet.AssertBuild (project_path, properties); @@ -2307,7 +2307,9 @@ public void CustomizedCodeSigning (ApplePlatform platform, string runtimeIdentif appBundleContents.ExceptWith (directoriesThatMustExist); // And that there are no other signed apps - var signatures = appBundleContents.Where (v => v.EndsWith ("_CodeSignature", StringComparison.Ordinal)); + var signatures = appBundleContents + .Where (v => v.EndsWith ("_CodeSignature", StringComparison.Ordinal)) + .Where (v => useMonoRuntime || !v.Contains (".framework/")); // CoreCLR runtime frameworks are signed - that's expected Assert.That (signatures, Is.Empty, "No other signed app bundles"); // Assert that some dylibs are signed @@ -2325,6 +2327,7 @@ public void CustomizedCodeSigning (ApplePlatform platform, string runtimeIdentif // And that there are unsigned dylibs, but not the system ones var remainingDylibs = appBundleContents .Where (v => Path.GetExtension (v) == ".dylib") + .Where (v => useMonoRuntime || string.IsNullOrEmpty (dylibDir) || Path.GetDirectoryName (v) != dylibDir) // CoreCLR native runtime dylibs are signed - ignore them here .ToArray (); foreach (var unsignedDylib in remainingDylibs) { var path = Path.Combine (appPath, unsignedDylib); From 31a68c0e236c41a514de519e609d2ad8d65a91ce Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 15:23:29 +0200 Subject: [PATCH 07/25] [tests] Dedup tests are only applicable to MonoVM. --- tests/dotnet/UnitTests/ProjectTest.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index cdee47306dd1..039801a50c40 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2910,7 +2910,7 @@ public void DedupEnabledTest (ApplePlatform platform, string runtimeIdentifiers, Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); properties ["MtouchInterpreter"] = $"\"{mtouchInterpreter}\""; - + properties ["UseMonoRuntime"] = "true"; // this test only apples when using Mono DotNet.AssertBuild (project_path, properties); var objDir = GetObjDir (project_path, platform, runtimeIdentifiers); @@ -2934,6 +2934,7 @@ public void DedupDisabledTest (ApplePlatform platform, string runtimeIdentifiers Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); properties ["MtouchInterpreter"] = $"\"{mtouchInterpreter}\""; + properties ["UseMonoRuntime"] = "true"; // this test only apples when using Mono DotNet.AssertBuild (project_path, properties); @@ -2955,6 +2956,7 @@ public void DedupUniversalAppTest (ApplePlatform platform, string runtimeIdentif Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); properties ["MtouchInterpreter"] = $"\"{mtouchInterpreter}\""; + properties ["UseMonoRuntime"] = "true"; // this test only apples when using Mono DotNet.AssertBuild (project_path, properties); From ef006eff1de3e5949823eb404a95c64750eacca2 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 16:23:19 +0200 Subject: [PATCH 08/25] [msbuild] Don't run R2R framework/dylib creation when IsMacEnabled=false When CoreCLR is the default runtime, iOS/tvOS builds enable R2R compilation (CreateR2RFramework=true, CreateR2RDylib=true). The _CreateR2RFramework and _CreateR2RDylib targets invoke native toolchain tasks (CompileAppManifest, LinkNativeCode) that require Xcode/Mac SDK tools. When IsMacEnabled=false (simulating a Windows build environment), the Mac SDK is unavailable and _SdkVersion is empty, causing the CompileAppManifest task to fail with a missing parameter error. Add 'And $(IsMacEnabled) != false' to the conditions of both targets to skip R2R framework/dylib creation when building without Mac tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/targets/Microsoft.Sdk.R2R.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/targets/Microsoft.Sdk.R2R.targets b/dotnet/targets/Microsoft.Sdk.R2R.targets index 71c6f4aff0a7..c4d89aae5458 100644 --- a/dotnet/targets/Microsoft.Sdk.R2R.targets +++ b/dotnet/targets/Microsoft.Sdk.R2R.targets @@ -300,7 +300,7 @@ @@ -393,7 +393,7 @@ From 99a5310bf55dbd248e6c0dd7f8aa8785655d3601 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 16:29:08 +0200 Subject: [PATCH 09/25] [tests] Split IsNotMacBuild into _Mono and _CoreCLR variants Follow the same pattern as BundleStructureTest: split the public test method into IsNotMacBuild_Mono and IsNotMacBuild_CoreCLR, each calling a private IsNotMacBuild() helper that accepts a useMonoRuntime flag. The UseInterpreter=true test case is only included in the Mono variant since the interpreter is a MonoVM-specific feature. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/ProjectTest.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 039801a50c40..d9ef3b70ce09 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -460,7 +460,23 @@ public void InvalidRuntimeIdentifiers (ApplePlatform platform, string runtimeIde [TestCase (ApplePlatform.iOS, "ios-arm64", true, "UseInterpreter=true")] [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", false)] [Category ("WindowsInclusive")] - public void IsNotMacBuild (ApplePlatform platform, string runtimeIdentifiers, bool isDeviceBuild, string? extraProperties = null, string configuration = "Debug") + public void IsNotMacBuild_Mono (ApplePlatform platform, string runtimeIdentifiers, bool isDeviceBuild, string? extraProperties = null, string configuration = "Debug") + { + IsNotMacBuild (platform, runtimeIdentifiers, isDeviceBuild, extraProperties, configuration, useMonoRuntime: true); + } + + [Test] + [TestCase (ApplePlatform.iOS, "iossimulator-x64", false)] + [TestCase (ApplePlatform.iOS, "ios-arm64", true)] + [TestCase (ApplePlatform.iOS, "ios-arm64", true, null, "Release")] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", false)] + [Category ("WindowsInclusive")] + public void IsNotMacBuild_CoreCLR (ApplePlatform platform, string runtimeIdentifiers, bool isDeviceBuild, string? extraProperties = null, string configuration = "Debug") + { + IsNotMacBuild (platform, runtimeIdentifiers, isDeviceBuild, extraProperties, configuration, useMonoRuntime: false); + } + + void IsNotMacBuild (ApplePlatform platform, string runtimeIdentifiers, bool isDeviceBuild, string? extraProperties, string configuration, bool useMonoRuntime) { var project = "MySimpleApp"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -470,6 +486,7 @@ public void IsNotMacBuild (ApplePlatform platform, string runtimeIdentifiers, bo Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); properties ["IsMacEnabled"] = "false"; + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; if (!string.IsNullOrEmpty (configuration)) properties ["Configuration"] = configuration; if (extraProperties is not null) { From fb010926ad3584e1a575df256827b2b2635f5003 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 18:34:16 +0200 Subject: [PATCH 10/25] [tests] Split LinkedWithNativeLibraries into _Mono and _CoreCLR variants CoreCLR builds link against additional native runtime libraries: - On iOS/tvOS: @rpath/libcoreclr.framework/libcoreclr and friends, plus the R2R framework (@rpath/MySimpleApp.framework/MySimpleApp) - On macOS/MacCatalyst: @executable_path/.../libcoreclr.dylib and friends, plus the R2R dylib (MySimpleApp.r2r.dylib) CoreCLR None builds are also missing CryptoKit compared to MonoVM, since CoreCLR's BCL doesn't reference it. macOS is CoreCLR-only (no Mono variant), so it's only in _CoreCLR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/ProjectTest.cs | 596 +++++++++++++++++++++++++- 1 file changed, 581 insertions(+), 15 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index d9ef3b70ce09..99c8bbe0cd7c 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -3023,7 +3023,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl DotNet.AssertBuild (project_path, properties); } - static string [] expectedFrameworks_iOS_None = [ + static string [] expectedFrameworks_iOS_None_Mono = [ "/System/Library/Frameworks/Accelerate.framework/Accelerate", "/System/Library/Frameworks/Accessibility.framework/Accessibility", "/System/Library/Frameworks/AccessorySetupKit.framework/AccessorySetupKit", @@ -3191,7 +3191,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftXPC.dylib", ]; - static string [] expectedFrameworks_iOS_Full = [ + static string [] expectedFrameworks_iOS_Full_Mono = [ "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", "/System/Library/Frameworks/Foundation.framework/Foundation", @@ -3207,7 +3207,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string [] expectedFrameworks_tvOS_None = [ + static string [] expectedFrameworks_tvOS_None_Mono = [ "/System/Library/Frameworks/Accelerate.framework/Accelerate", "/System/Library/Frameworks/Accessibility.framework/Accessibility", "/System/Library/Frameworks/AdSupport.framework/AdSupport", @@ -3317,7 +3317,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", ]; - static string [] expectedFrameworks_tvOS_Full = [ + static string [] expectedFrameworks_tvOS_Full_Mono = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", "/System/Library/Frameworks/Foundation.framework/Foundation", "/System/Library/Frameworks/Security.framework/Security", @@ -3532,7 +3532,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string [] expectedFrameworks_MacCatalyst_None = [ + static string [] expectedFrameworks_MacCatalyst_None_Mono = [ "/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", @@ -3690,7 +3690,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftXPC.dylib", ]; - static string [] expectedFrameworks_MacCatalyst_Full = [ + static string [] expectedFrameworks_MacCatalyst_Full_Mono = [ "/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", @@ -3710,7 +3710,561 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static IEnumerable GetLinkedWithNativeLibrariesTestCases () + static string [] expectedFrameworks_iOS_None_CoreCLR = [ + "@rpath/libcoreclr.framework/libcoreclr", + "@rpath/libmscordaccore.framework/libmscordaccore", + "@rpath/libmscordbi.framework/libmscordbi", + "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", + "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", + "@rpath/libSystem.Native.framework/libSystem.Native", + "@rpath/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native", + "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", + "@rpath/MySimpleApp.framework/MySimpleApp", + "/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/DataDetection.framework/DataDetection", + "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck", + "/System/Library/Frameworks/DeviceDiscoveryExtension.framework/DeviceDiscoveryExtension", + "/System/Library/Frameworks/DeviceDiscoveryUI.framework/DeviceDiscoveryUI", + "/System/Library/Frameworks/EventKit.framework/EventKit", + "/System/Library/Frameworks/EventKitUI.framework/EventKitUI", + "/System/Library/Frameworks/ExtensionKit.framework/ExtensionKit", + "/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/GameSave.framework/GameSave", + "/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/SecurityUI.framework/SecurityUI", + "/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/TouchController.framework/TouchController", + "/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", + "/usr/lib/libicucore.A.dylib", + "/usr/lib/swift/libswiftCore.dylib", + "/usr/lib/swift/libswiftCoreFoundation.dylib", + "/usr/lib/swift/libswiftCoreImage.dylib", + "/usr/lib/swift/libswiftDarwin.dylib", + "/usr/lib/swift/libswiftDispatch.dylib", + "/usr/lib/swift/libswiftFoundation.dylib", + "/usr/lib/swift/libswiftMetal.dylib", + "/usr/lib/swift/libswiftObjectiveC.dylib", + "/usr/lib/swift/libswiftos.dylib", + "/usr/lib/swift/libswiftOSLog.dylib", + "/usr/lib/swift/libswiftQuartzCore.dylib", + "/usr/lib/swift/libswiftUIKit.dylib", + "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", + "/usr/lib/swift/libswiftXPC.dylib", + ]; + + static string [] expectedFrameworks_iOS_Full_CoreCLR = [ + "@rpath/libcoreclr.framework/libcoreclr", + "@rpath/libmscordaccore.framework/libmscordaccore", + "@rpath/libmscordbi.framework/libmscordbi", + "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", + "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", + "@rpath/libSystem.Native.framework/libSystem.Native", + "@rpath/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native", + "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", + "@rpath/MySimpleApp.framework/MySimpleApp", + "/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/libicucore.A.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string [] expectedFrameworks_tvOS_None_CoreCLR = [ + "@rpath/libcoreclr.framework/libcoreclr", + "@rpath/libmscordaccore.framework/libmscordaccore", + "@rpath/libmscordbi.framework/libmscordbi", + "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", + "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", + "@rpath/libSystem.Native.framework/libSystem.Native", + "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", + "@rpath/MySimpleApp.framework/MySimpleApp", + "/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/AVRouting.framework/AVRouting", + "/System/Library/Frameworks/BackgroundAssets.framework/BackgroundAssets", + "/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/DataDetection.framework/DataDetection", + "/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/MetalFX.framework/MetalFX", + "/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/PDFKit.framework/PDFKit", + "/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/SecurityUI.framework/SecurityUI", + "/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/libicucore.A.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + "/usr/lib/swift/libswiftCore.dylib", + "/usr/lib/swift/libswiftCoreFoundation.dylib", + "/usr/lib/swift/libswiftCoreImage.dylib", + "/usr/lib/swift/libswiftDarwin.dylib", + "/usr/lib/swift/libswiftDispatch.dylib", + "/usr/lib/swift/libswiftFoundation.dylib", + "/usr/lib/swift/libswiftMetal.dylib", + "/usr/lib/swift/libswiftObjectiveC.dylib", + "/usr/lib/swift/libswiftos.dylib", + "/usr/lib/swift/libswiftOSLog.dylib", + "/usr/lib/swift/libswiftQuartzCore.dylib", + "/usr/lib/swift/libswiftUIKit.dylib", + "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", + ]; + + static string [] expectedFrameworks_tvOS_Full_CoreCLR = [ + "@rpath/libcoreclr.framework/libcoreclr", + "@rpath/libmscordaccore.framework/libmscordaccore", + "@rpath/libmscordbi.framework/libmscordbi", + "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", + "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", + "@rpath/libSystem.Native.framework/libSystem.Native", + "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", + "@rpath/MySimpleApp.framework/MySimpleApp", + "/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/libicucore.A.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static string [] expectedFrameworks_MacCatalyst_None_CoreCLR = [ + "@executable_path/../../Contents/MonoBundle/libcoreclr.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/MySimpleApp.r2r.dylib", + "/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/Cinematic.framework/Versions/A/Cinematic", + "/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/ExtensionKit.framework/Versions/A/ExtensionKit", + "/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/GameSave.framework/Versions/A/GameSave", + "/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/ScreenCaptureKit.framework/Versions/A/ScreenCaptureKit", + "/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/DataDetection.framework/Versions/A/DataDetection", + "/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/MetalFX.framework/Versions/A/MetalFX", + "/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/SecurityUI.framework/Versions/A/SecurityUI", + "/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/libicucore.A.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + "/usr/lib/swift/libswiftCore.dylib", + "/usr/lib/swift/libswiftCoreFoundation.dylib", + "/usr/lib/swift/libswiftCoreImage.dylib", + "/usr/lib/swift/libswiftDarwin.dylib", + "/usr/lib/swift/libswiftDispatch.dylib", + "/usr/lib/swift/libswiftIOKit.dylib", + "/usr/lib/swift/libswiftMetal.dylib", + "/usr/lib/swift/libswiftObjectiveC.dylib", + "/usr/lib/swift/libswiftos.dylib", + "/usr/lib/swift/libswiftOSLog.dylib", + "/usr/lib/swift/libswiftQuartzCore.dylib", + "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", + "/usr/lib/swift/libswiftXPC.dylib", + ]; + + static string [] expectedFrameworks_MacCatalyst_Full_CoreCLR = [ + "@executable_path/../../Contents/MonoBundle/libcoreclr.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/MySimpleApp.r2r.dylib", + "/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/libicucore.A.dylib", + "/usr/lib/libobjc.A.dylib", + "/usr/lib/libSystem.B.dylib", + "/usr/lib/libz.1.dylib", + ]; + + static IEnumerable GetLinkedWithNativeLibrariesTestCases_Mono () + { + // 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). + // + // However, new .NET versions often require updates to both the "None" and "Full lists of frameworks and libraries. + // + + yield return new TestCaseData (ApplePlatform.iOS, "ios-arm64", "None", expectedFrameworks_iOS_None_Mono); + yield return new TestCaseData (ApplePlatform.iOS, "ios-arm64", "Full", expectedFrameworks_iOS_Full_Mono); + yield return new TestCaseData (ApplePlatform.TVOS, "tvos-arm64", "None", expectedFrameworks_tvOS_None_Mono); + yield return new TestCaseData (ApplePlatform.TVOS, "tvos-arm64", "Full", expectedFrameworks_tvOS_Full_Mono); + yield return new TestCaseData (ApplePlatform.MacCatalyst, "maccatalyst-x64", "None", expectedFrameworks_MacCatalyst_None_Mono); + yield return new TestCaseData (ApplePlatform.MacCatalyst, "maccatalyst-x64", "Full", expectedFrameworks_MacCatalyst_Full_Mono); + } + + static IEnumerable GetLinkedWithNativeLibrariesTestCases_CoreCLR () { // 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 @@ -3721,18 +4275,29 @@ static IEnumerable GetLinkedWithNativeLibrariesTestCases () // However, new .NET versions often require updates to both the "None" and "Full lists of frameworks and libraries. // - 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.iOS, "ios-arm64", "None", expectedFrameworks_iOS_None_CoreCLR); + yield return new TestCaseData (ApplePlatform.iOS, "ios-arm64", "Full", expectedFrameworks_iOS_Full_CoreCLR); + yield return new TestCaseData (ApplePlatform.TVOS, "tvos-arm64", "None", expectedFrameworks_tvOS_None_CoreCLR); + yield return new TestCaseData (ApplePlatform.TVOS, "tvos-arm64", "Full", expectedFrameworks_tvOS_Full_CoreCLR); 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); + yield return new TestCaseData (ApplePlatform.MacCatalyst, "maccatalyst-x64", "None", expectedFrameworks_MacCatalyst_None_CoreCLR); + yield return new TestCaseData (ApplePlatform.MacCatalyst, "maccatalyst-x64", "Full", expectedFrameworks_MacCatalyst_Full_CoreCLR); + } + + [TestCaseSource (nameof (GetLinkedWithNativeLibrariesTestCases_Mono))] + public void LinkedWithNativeLibraries_Mono (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string [] expectedFrameworks) + { + LinkedWithNativeLibraries (platform, runtimeIdentifiers, linkMode, expectedFrameworks, useMonoRuntime: true); } - [TestCaseSource (nameof (GetLinkedWithNativeLibrariesTestCases))] - public void LinkedWithNativeLibraries (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string [] expectedFrameworks) + [TestCaseSource (nameof (GetLinkedWithNativeLibrariesTestCases_CoreCLR))] + public void LinkedWithNativeLibraries_CoreCLR (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string [] expectedFrameworks) + { + LinkedWithNativeLibraries (platform, runtimeIdentifiers, linkMode, expectedFrameworks, useMonoRuntime: false); + } + + void LinkedWithNativeLibraries (ApplePlatform platform, string runtimeIdentifiers, string linkMode, string [] expectedFrameworks, bool useMonoRuntime) { var project = "MySimpleApp"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -3743,6 +4308,7 @@ public void LinkedWithNativeLibraries (ApplePlatform platform, string runtimeIde var properties = GetDefaultProperties (runtimeIdentifiers); properties ["MtouchLink"] = linkMode; properties ["LinkMode"] = linkMode; + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; if (platform != ApplePlatform.MacOSX) properties ["UseInterpreter"] = "true"; // just to speed up the build DotNet.AssertBuild (project_path, properties); From de048809a27d89c37fef843f29eb636d99f12a31 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 19:17:06 +0200 Subject: [PATCH 11/25] [tests] Reduce duplication in expectedFrameworks arrays Extract shared coreclrFrameworks_iOS/tvOS/MacCatalyst arrays with the CoreCLR runtime library entries. Rename the _Mono base arrays to have no suffix (common to both runtimes), then build the _Mono and _CoreCLR variants using spread expressions: _None_Mono = [.. base_None, CryptoKit] _None_CoreCLR = [.. coreclrFrameworks, .. base_None] _Full_Mono = base_Full (alias) _Full_CoreCLR = [.. coreclrFrameworks, .. base_Full] This removes ~530 lines of duplicated framework lists. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/ProjectTest.cs | 600 +++----------------------- 1 file changed, 58 insertions(+), 542 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 99c8bbe0cd7c..6b1ed51a7c3f 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -3023,7 +3023,42 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl DotNet.AssertBuild (project_path, properties); } - static string [] expectedFrameworks_iOS_None_Mono = [ + static string [] coreclrFrameworks_iOS = [ + "@rpath/libcoreclr.framework/libcoreclr", + "@rpath/libmscordaccore.framework/libmscordaccore", + "@rpath/libmscordbi.framework/libmscordbi", + "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", + "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", + "@rpath/libSystem.Native.framework/libSystem.Native", + "@rpath/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native", + "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", + "@rpath/MySimpleApp.framework/MySimpleApp", + ]; + + static string [] coreclrFrameworks_tvOS = [ + "@rpath/libcoreclr.framework/libcoreclr", + "@rpath/libmscordaccore.framework/libmscordaccore", + "@rpath/libmscordbi.framework/libmscordbi", + "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", + "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", + "@rpath/libSystem.Native.framework/libSystem.Native", + "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", + "@rpath/MySimpleApp.framework/MySimpleApp", + ]; + + static string [] coreclrFrameworks_MacCatalyst = [ + "@executable_path/../../Contents/MonoBundle/libcoreclr.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/MySimpleApp.r2r.dylib", + ]; + + static string [] expectedFrameworks_iOS_None = [ "/System/Library/Frameworks/Accelerate.framework/Accelerate", "/System/Library/Frameworks/Accessibility.framework/Accessibility", "/System/Library/Frameworks/AccessorySetupKit.framework/AccessorySetupKit", @@ -3173,7 +3208,6 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libobjc.A.dylib", "/usr/lib/libSystem.B.dylib", "/usr/lib/libz.1.dylib", - "/System/Library/Frameworks/CryptoKit.framework/CryptoKit", "/usr/lib/libicucore.A.dylib", "/usr/lib/swift/libswiftCore.dylib", "/usr/lib/swift/libswiftCoreFoundation.dylib", @@ -3191,7 +3225,9 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftXPC.dylib", ]; - static string [] expectedFrameworks_iOS_Full_Mono = [ + static string [] expectedFrameworks_iOS_None_Mono = [.. expectedFrameworks_iOS_None, "/System/Library/Frameworks/CryptoKit.framework/CryptoKit"]; + + static string [] expectedFrameworks_iOS_Full = [ "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", "/System/Library/Frameworks/Foundation.framework/Foundation", @@ -3207,7 +3243,9 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string [] expectedFrameworks_tvOS_None_Mono = [ + static string [] expectedFrameworks_iOS_Full_Mono = expectedFrameworks_iOS_Full; + + static string [] expectedFrameworks_tvOS_None = [ "/System/Library/Frameworks/Accelerate.framework/Accelerate", "/System/Library/Frameworks/Accessibility.framework/Accessibility", "/System/Library/Frameworks/AdSupport.framework/AdSupport", @@ -3235,7 +3273,6 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight", "/System/Library/Frameworks/CoreText.framework/CoreText", "/System/Library/Frameworks/CoreVideo.framework/CoreVideo", - "/System/Library/Frameworks/CryptoKit.framework/CryptoKit", "/System/Library/Frameworks/CryptoTokenKit.framework/CryptoTokenKit", "/System/Library/Frameworks/DataDetection.framework/DataDetection", "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck", @@ -3317,7 +3354,9 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", ]; - static string [] expectedFrameworks_tvOS_Full_Mono = [ + static string [] expectedFrameworks_tvOS_None_Mono = [.. expectedFrameworks_tvOS_None, "/System/Library/Frameworks/CryptoKit.framework/CryptoKit"]; + + static string [] expectedFrameworks_tvOS_Full = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", "/System/Library/Frameworks/Foundation.framework/Foundation", "/System/Library/Frameworks/Security.framework/Security", @@ -3331,6 +3370,8 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; + static string [] expectedFrameworks_tvOS_Full_Mono = expectedFrameworks_tvOS_Full; + static string [] expectedFrameworks_macOS_None = [ "@executable_path/../../Contents/MonoBundle/libclrgc.dylib", "@executable_path/../../Contents/MonoBundle/libclrgcexp.dylib", @@ -3532,7 +3573,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string [] expectedFrameworks_MacCatalyst_None_Mono = [ + 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", @@ -3616,7 +3657,6 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/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/CryptoKit.framework/Versions/A/CryptoKit", "/System/Library/Frameworks/CryptoTokenKit.framework/Versions/A/CryptoTokenKit", "/System/Library/Frameworks/DataDetection.framework/Versions/A/DataDetection", "/System/Library/Frameworks/DeviceCheck.framework/Versions/A/DeviceCheck", @@ -3690,7 +3730,9 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftXPC.dylib", ]; - static string [] expectedFrameworks_MacCatalyst_Full_Mono = [ + static string [] expectedFrameworks_MacCatalyst_None_Mono = [.. expectedFrameworks_MacCatalyst_None, "/System/Library/Frameworks/CryptoKit.framework/Versions/A/CryptoKit"]; + + 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", @@ -3710,540 +3752,14 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/libz.1.dylib", ]; - static string [] expectedFrameworks_iOS_None_CoreCLR = [ - "@rpath/libcoreclr.framework/libcoreclr", - "@rpath/libmscordaccore.framework/libmscordaccore", - "@rpath/libmscordbi.framework/libmscordbi", - "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", - "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", - "@rpath/libSystem.Native.framework/libSystem.Native", - "@rpath/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native", - "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", - "@rpath/MySimpleApp.framework/MySimpleApp", - "/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/DataDetection.framework/DataDetection", - "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck", - "/System/Library/Frameworks/DeviceDiscoveryExtension.framework/DeviceDiscoveryExtension", - "/System/Library/Frameworks/DeviceDiscoveryUI.framework/DeviceDiscoveryUI", - "/System/Library/Frameworks/EventKit.framework/EventKit", - "/System/Library/Frameworks/EventKitUI.framework/EventKitUI", - "/System/Library/Frameworks/ExtensionKit.framework/ExtensionKit", - "/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/GameSave.framework/GameSave", - "/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/SecurityUI.framework/SecurityUI", - "/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/TouchController.framework/TouchController", - "/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", - "/usr/lib/libicucore.A.dylib", - "/usr/lib/swift/libswiftCore.dylib", - "/usr/lib/swift/libswiftCoreFoundation.dylib", - "/usr/lib/swift/libswiftCoreImage.dylib", - "/usr/lib/swift/libswiftDarwin.dylib", - "/usr/lib/swift/libswiftDispatch.dylib", - "/usr/lib/swift/libswiftFoundation.dylib", - "/usr/lib/swift/libswiftMetal.dylib", - "/usr/lib/swift/libswiftObjectiveC.dylib", - "/usr/lib/swift/libswiftos.dylib", - "/usr/lib/swift/libswiftOSLog.dylib", - "/usr/lib/swift/libswiftQuartzCore.dylib", - "/usr/lib/swift/libswiftUIKit.dylib", - "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", - "/usr/lib/swift/libswiftXPC.dylib", - ]; - - static string [] expectedFrameworks_iOS_Full_CoreCLR = [ - "@rpath/libcoreclr.framework/libcoreclr", - "@rpath/libmscordaccore.framework/libmscordaccore", - "@rpath/libmscordbi.framework/libmscordbi", - "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", - "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", - "@rpath/libSystem.Native.framework/libSystem.Native", - "@rpath/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native", - "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", - "@rpath/MySimpleApp.framework/MySimpleApp", - "/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/libicucore.A.dylib", - "/usr/lib/libobjc.A.dylib", - "/usr/lib/libSystem.B.dylib", - "/usr/lib/libz.1.dylib", - ]; + static string [] expectedFrameworks_MacCatalyst_Full_Mono = expectedFrameworks_MacCatalyst_Full; - static string [] expectedFrameworks_tvOS_None_CoreCLR = [ - "@rpath/libcoreclr.framework/libcoreclr", - "@rpath/libmscordaccore.framework/libmscordaccore", - "@rpath/libmscordbi.framework/libmscordbi", - "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", - "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", - "@rpath/libSystem.Native.framework/libSystem.Native", - "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", - "@rpath/MySimpleApp.framework/MySimpleApp", - "/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/AVRouting.framework/AVRouting", - "/System/Library/Frameworks/BackgroundAssets.framework/BackgroundAssets", - "/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/DataDetection.framework/DataDetection", - "/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/MetalFX.framework/MetalFX", - "/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/PDFKit.framework/PDFKit", - "/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/SecurityUI.framework/SecurityUI", - "/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/libicucore.A.dylib", - "/usr/lib/libobjc.A.dylib", - "/usr/lib/libSystem.B.dylib", - "/usr/lib/libz.1.dylib", - "/usr/lib/swift/libswiftCore.dylib", - "/usr/lib/swift/libswiftCoreFoundation.dylib", - "/usr/lib/swift/libswiftCoreImage.dylib", - "/usr/lib/swift/libswiftDarwin.dylib", - "/usr/lib/swift/libswiftDispatch.dylib", - "/usr/lib/swift/libswiftFoundation.dylib", - "/usr/lib/swift/libswiftMetal.dylib", - "/usr/lib/swift/libswiftObjectiveC.dylib", - "/usr/lib/swift/libswiftos.dylib", - "/usr/lib/swift/libswiftOSLog.dylib", - "/usr/lib/swift/libswiftQuartzCore.dylib", - "/usr/lib/swift/libswiftUIKit.dylib", - "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", - ]; - - static string [] expectedFrameworks_tvOS_Full_CoreCLR = [ - "@rpath/libcoreclr.framework/libcoreclr", - "@rpath/libmscordaccore.framework/libmscordaccore", - "@rpath/libmscordbi.framework/libmscordbi", - "@rpath/libSystem.Globalization.Native.framework/libSystem.Globalization.Native", - "@rpath/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native", - "@rpath/libSystem.Native.framework/libSystem.Native", - "@rpath/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple", - "@rpath/MySimpleApp.framework/MySimpleApp", - "/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/libicucore.A.dylib", - "/usr/lib/libobjc.A.dylib", - "/usr/lib/libSystem.B.dylib", - "/usr/lib/libz.1.dylib", - ]; - - static string [] expectedFrameworks_MacCatalyst_None_CoreCLR = [ - "@executable_path/../../Contents/MonoBundle/libcoreclr.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/MySimpleApp.r2r.dylib", - "/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/Cinematic.framework/Versions/A/Cinematic", - "/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/ExtensionKit.framework/Versions/A/ExtensionKit", - "/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/GameSave.framework/Versions/A/GameSave", - "/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/ScreenCaptureKit.framework/Versions/A/ScreenCaptureKit", - "/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/DataDetection.framework/Versions/A/DataDetection", - "/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/MetalFX.framework/Versions/A/MetalFX", - "/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/SecurityUI.framework/Versions/A/SecurityUI", - "/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/libicucore.A.dylib", - "/usr/lib/libobjc.A.dylib", - "/usr/lib/libSystem.B.dylib", - "/usr/lib/libz.1.dylib", - "/usr/lib/swift/libswiftCore.dylib", - "/usr/lib/swift/libswiftCoreFoundation.dylib", - "/usr/lib/swift/libswiftCoreImage.dylib", - "/usr/lib/swift/libswiftDarwin.dylib", - "/usr/lib/swift/libswiftDispatch.dylib", - "/usr/lib/swift/libswiftIOKit.dylib", - "/usr/lib/swift/libswiftMetal.dylib", - "/usr/lib/swift/libswiftObjectiveC.dylib", - "/usr/lib/swift/libswiftos.dylib", - "/usr/lib/swift/libswiftOSLog.dylib", - "/usr/lib/swift/libswiftQuartzCore.dylib", - "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", - "/usr/lib/swift/libswiftXPC.dylib", - ]; - - static string [] expectedFrameworks_MacCatalyst_Full_CoreCLR = [ - "@executable_path/../../Contents/MonoBundle/libcoreclr.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/MySimpleApp.r2r.dylib", - "/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/libicucore.A.dylib", - "/usr/lib/libobjc.A.dylib", - "/usr/lib/libSystem.B.dylib", - "/usr/lib/libz.1.dylib", - ]; + static string [] expectedFrameworks_iOS_None_CoreCLR = [.. coreclrFrameworks_iOS, .. expectedFrameworks_iOS_None]; + static string [] expectedFrameworks_iOS_Full_CoreCLR = [.. coreclrFrameworks_iOS, .. expectedFrameworks_iOS_Full]; + static string [] expectedFrameworks_tvOS_None_CoreCLR = [.. coreclrFrameworks_tvOS, .. expectedFrameworks_tvOS_None]; + static string [] expectedFrameworks_tvOS_Full_CoreCLR = [.. coreclrFrameworks_tvOS, .. expectedFrameworks_tvOS_Full]; + static string [] expectedFrameworks_MacCatalyst_None_CoreCLR = [.. coreclrFrameworks_MacCatalyst, .. expectedFrameworks_MacCatalyst_None]; + static string [] expectedFrameworks_MacCatalyst_Full_CoreCLR = [.. coreclrFrameworks_MacCatalyst, .. expectedFrameworks_MacCatalyst_Full]; static IEnumerable GetLinkedWithNativeLibrariesTestCases_Mono () { From 231e941f096c83c32f3711c0a297efa7fbd9e807 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 2 Apr 2026 19:26:37 +0200 Subject: [PATCH 12/25] [tests] Format compact array declarations with one element per line Makes future diffs easier to read when frameworks are added or removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/ProjectTest.cs | 45 +++++++++++++++++++++------ 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 6b1ed51a7c3f..d4183d7ab153 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -3225,7 +3225,10 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftXPC.dylib", ]; - static string [] expectedFrameworks_iOS_None_Mono = [.. expectedFrameworks_iOS_None, "/System/Library/Frameworks/CryptoKit.framework/CryptoKit"]; + static string [] expectedFrameworks_iOS_None_Mono = [ + .. expectedFrameworks_iOS_None, + "/System/Library/Frameworks/CryptoKit.framework/CryptoKit", + ]; static string [] expectedFrameworks_iOS_Full = [ "/System/Library/Frameworks/CFNetwork.framework/CFNetwork", @@ -3354,7 +3357,10 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib", ]; - static string [] expectedFrameworks_tvOS_None_Mono = [.. expectedFrameworks_tvOS_None, "/System/Library/Frameworks/CryptoKit.framework/CryptoKit"]; + static string [] expectedFrameworks_tvOS_None_Mono = [ + .. expectedFrameworks_tvOS_None, + "/System/Library/Frameworks/CryptoKit.framework/CryptoKit", + ]; static string [] expectedFrameworks_tvOS_Full = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", @@ -3730,7 +3736,10 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/usr/lib/swift/libswiftXPC.dylib", ]; - static string [] expectedFrameworks_MacCatalyst_None_Mono = [.. expectedFrameworks_MacCatalyst_None, "/System/Library/Frameworks/CryptoKit.framework/Versions/A/CryptoKit"]; + static string [] expectedFrameworks_MacCatalyst_None_Mono = [ + .. expectedFrameworks_MacCatalyst_None, + "/System/Library/Frameworks/CryptoKit.framework/Versions/A/CryptoKit", + ]; static string [] expectedFrameworks_MacCatalyst_Full = [ "/System/iOSSupport/System/Library/Frameworks/UIKit.framework/Versions/A/UIKit", @@ -3754,12 +3763,30 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl static string [] expectedFrameworks_MacCatalyst_Full_Mono = expectedFrameworks_MacCatalyst_Full; - static string [] expectedFrameworks_iOS_None_CoreCLR = [.. coreclrFrameworks_iOS, .. expectedFrameworks_iOS_None]; - static string [] expectedFrameworks_iOS_Full_CoreCLR = [.. coreclrFrameworks_iOS, .. expectedFrameworks_iOS_Full]; - static string [] expectedFrameworks_tvOS_None_CoreCLR = [.. coreclrFrameworks_tvOS, .. expectedFrameworks_tvOS_None]; - static string [] expectedFrameworks_tvOS_Full_CoreCLR = [.. coreclrFrameworks_tvOS, .. expectedFrameworks_tvOS_Full]; - static string [] expectedFrameworks_MacCatalyst_None_CoreCLR = [.. coreclrFrameworks_MacCatalyst, .. expectedFrameworks_MacCatalyst_None]; - static string [] expectedFrameworks_MacCatalyst_Full_CoreCLR = [.. coreclrFrameworks_MacCatalyst, .. expectedFrameworks_MacCatalyst_Full]; + static string [] expectedFrameworks_iOS_None_CoreCLR = [ + .. coreclrFrameworks_iOS, + .. expectedFrameworks_iOS_None, + ]; + static string [] expectedFrameworks_iOS_Full_CoreCLR = [ + .. coreclrFrameworks_iOS, + .. expectedFrameworks_iOS_Full, + ]; + static string [] expectedFrameworks_tvOS_None_CoreCLR = [ + .. coreclrFrameworks_tvOS, + .. expectedFrameworks_tvOS_None, + ]; + static string [] expectedFrameworks_tvOS_Full_CoreCLR = [ + .. coreclrFrameworks_tvOS, + .. expectedFrameworks_tvOS_Full, + ]; + static string [] expectedFrameworks_MacCatalyst_None_CoreCLR = [ + .. coreclrFrameworks_MacCatalyst, + .. expectedFrameworks_MacCatalyst_None, + ]; + static string [] expectedFrameworks_MacCatalyst_Full_CoreCLR = [ + .. coreclrFrameworks_MacCatalyst, + .. expectedFrameworks_MacCatalyst_Full, + ]; static IEnumerable GetLinkedWithNativeLibrariesTestCases_Mono () { From a2ad2b14ffbf07ddc6ce0d327ab3872a6f1baf40 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 3 Apr 2026 09:54:09 +0200 Subject: [PATCH 13/25] [msbuild] Fix empty R2R framework name in multi-RID builds; add Mono/CoreCLR test variants The R2R framework properties (_R2RFrameworkName, _R2RFrameworkPath, etc.) were declared inside the _PrepareR2RFrameworkCreation target, so they were only available after that target ran. In multi-RID outer builds (RuntimeIdentifiers=ios-arm64), _PrepareR2RFrameworkCreation never executes because CreateReadyToRunImages dispatches to inner builds. This left _R2RFrameworkName empty in the outer build context. _CollectR2RFrameworksForPostProcessing uses _R2RFrameworkName to populate the post-processing item list for dsymutil/strip. With an empty name it produced a path like 'Frameworks/.framework/', causing dsymutil to fail: 'cannot parse the debug map: No such file or directory'. Fix: move all R2R framework PropertyGroup declarations to a static PropertyGroup outside any target in Microsoft.Sdk.R2R.targets. DeviceSpecificIntermediateOutputPath is stable at evaluation time (set in Xamarin.Shared.props and not overridden in the .NET SDK targets), and AssemblyName is always available, so all derived properties are computed correctly in both inner builds and multi-RID outer builds. Also split PluralRuntimeIdentifiers and PluralRuntimeIdentifiersWithRemoteMac into _Mono and _CoreCLR test variants so both runtimes are covered explicitly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/targets/Microsoft.Sdk.R2R.targets | 43 +++++++++++++----------- tests/dotnet/UnitTests/ProjectTest.cs | 14 ++++++-- tests/dotnet/UnitTests/WindowsTest.cs | 13 +++++-- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/dotnet/targets/Microsoft.Sdk.R2R.targets b/dotnet/targets/Microsoft.Sdk.R2R.targets index c4d89aae5458..db1c4e90cb7d 100644 --- a/dotnet/targets/Microsoft.Sdk.R2R.targets +++ b/dotnet/targets/Microsoft.Sdk.R2R.targets @@ -149,27 +149,34 @@ - - - - <_DesktopFramework Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">true - <_DesktopFramework Condition="'$(_PlatformName)' != 'macOS' And '$(_PlatformName)' != 'MacCatalyst'">false + + + <_DesktopFramework Condition="'$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst'">true + <_DesktopFramework Condition="'$(_PlatformName)' != 'macOS' And '$(_PlatformName)' != 'MacCatalyst'">false - <_R2RFrameworkBinaryInfix Condition="'$(_DesktopFramework)' == 'true'">/Versions/A - <_R2RFrameworkResourcesInfix Condition="'$(_DesktopFramework)' == 'true'">/Versions/A/Resources + <_R2RFrameworkBinaryInfix Condition="'$(_DesktopFramework)' == 'true'">/Versions/A + <_R2RFrameworkResourcesInfix Condition="'$(_DesktopFramework)' == 'true'">/Versions/A/Resources - <_R2RFrameworkIntermediateOutputPath Condition="'$(_R2RFrameworkIntermediateOutputPath)' == ''">$(DeviceSpecificIntermediateOutputPath)r2rframework/ - <_R2RFrameworkName Condition="'$(_R2RFrameworkName)' == ''">$(AssemblyName) - <_R2RFrameworkPath Condition="'$(_R2RFrameworkPath)' == ''">$(_R2RFrameworkIntermediateOutputPath)$(_R2RFrameworkName).framework - <_R2RFrameworkOutput Condition="'$(_R2RFrameworkOutput)' == ''">$(_R2RFrameworkPath)$(_R2RFrameworkBinaryInfix)/$(_R2RFrameworkName) + <_R2RFrameworkIntermediateOutputPath Condition="'$(_R2RFrameworkIntermediateOutputPath)' == ''">$(DeviceSpecificIntermediateOutputPath)r2rframework/ + <_R2RFrameworkName Condition="'$(_R2RFrameworkName)' == ''">$(AssemblyName) + <_R2RFrameworkPath Condition="'$(_R2RFrameworkPath)' == ''">$(_R2RFrameworkIntermediateOutputPath)$(_R2RFrameworkName).framework + <_R2RFrameworkOutput Condition="'$(_R2RFrameworkOutput)' == ''">$(_R2RFrameworkPath)$(_R2RFrameworkBinaryInfix)/$(_R2RFrameworkName) - <_R2RFrameworkStructureStampFile>$(_R2RFrameworkIntermediateOutputPath)$(_R2RFrameworkName)-structure.stamp + <_R2RFrameworkStructureStampFile>$(_R2RFrameworkIntermediateOutputPath)$(_R2RFrameworkName)-structure.stamp - <_R2RFrameworkInfoPlistPath>$(_R2RFrameworkPath)$(_R2RFrameworkResourcesInfix)/Info.plist - + <_R2RFrameworkInfoPlistPath>$(_R2RFrameworkPath)$(_R2RFrameworkResourcesInfix)/Info.plist + <_R2RFrameworkCachePath>$(_R2RFrameworkIntermediateOutputPath)cache.txt + <_R2RFrameworkCachePath2>$(_R2RFrameworkCachePath).uptodate + + + + <_R2RFrameworkDirectories Include="$(_R2RFrameworkPath)" /> @@ -190,10 +197,6 @@ - - <_R2RFrameworkCachePath>$(_R2RFrameworkIntermediateOutputPath)cache.txt - <_R2RFrameworkCachePath2>$(_R2RFrameworkCachePath).uptodate - <_R2RFrameworkCache Include="@(_R2RFrameworkInputs)" /> <_R2RFrameworkCache Include="@(_R2RFrameworkLinkerFlags)" /> diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index d4183d7ab153..00c159b93146 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2253,12 +2253,19 @@ public void CustomAppBundleDir (ApplePlatform platform, string runtimeIdentifier [TestCase (ApplePlatform.iOS, "ios-arm64")] [TestCase (ApplePlatform.iOS, "iossimulator-x64;iossimulator-arm64")] - public void PluralRuntimeIdentifiers (ApplePlatform platform, string runtimeIdentifiers) + public void PluralRuntimeIdentifiers_Mono (ApplePlatform platform, string runtimeIdentifiers) { - PluralRuntimeIdentifiersImpl (platform, runtimeIdentifiers); + PluralRuntimeIdentifiersImpl (platform, runtimeIdentifiers, useMonoRuntime: true); } - internal static void PluralRuntimeIdentifiersImpl (ApplePlatform platform, string runtimeIdentifiers, Dictionary? extraProperties = null) + [TestCase (ApplePlatform.iOS, "ios-arm64")] + [TestCase (ApplePlatform.iOS, "iossimulator-x64;iossimulator-arm64")] + public void PluralRuntimeIdentifiers_CoreCLR (ApplePlatform platform, string runtimeIdentifiers) + { + PluralRuntimeIdentifiersImpl (platform, runtimeIdentifiers, useMonoRuntime: false); + } + + internal static void PluralRuntimeIdentifiersImpl (ApplePlatform platform, string runtimeIdentifiers, bool useMonoRuntime = false, Dictionary? extraProperties = null) { var project = "MySimpleApp"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -2268,6 +2275,7 @@ internal static void PluralRuntimeIdentifiersImpl (ApplePlatform platform, strin Clean (project_path); var properties = GetDefaultProperties (extraProperties: extraProperties); properties ["RuntimeIdentifiers"] = runtimeIdentifiers; + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; DotNet.AssertBuild (project_path, properties); } diff --git a/tests/dotnet/UnitTests/WindowsTest.cs b/tests/dotnet/UnitTests/WindowsTest.cs index b6dd9ca7dc3e..0dfc98e5cd8c 100644 --- a/tests/dotnet/UnitTests/WindowsTest.cs +++ b/tests/dotnet/UnitTests/WindowsTest.cs @@ -215,10 +215,19 @@ public void BundleStructureWithRemoteMac (ApplePlatform platform, string runtime [Category ("RemoteWindows")] [TestCase (ApplePlatform.iOS, "ios-arm64")] [TestCase (ApplePlatform.iOS, "iossimulator-arm64;iossimulator-x64")] - public void PluralRuntimeIdentifiersWithRemoteMac (ApplePlatform platform, string runtimeIdentifiers) + public void PluralRuntimeIdentifiersWithRemoteMac_Mono (ApplePlatform platform, string runtimeIdentifiers) { var properties = AddRemoteProperties (); - DotNetProjectTest.PluralRuntimeIdentifiersImpl (platform, runtimeIdentifiers, properties); + DotNetProjectTest.PluralRuntimeIdentifiersImpl (platform, runtimeIdentifiers, useMonoRuntime: true, extraProperties: properties); + } + + [Category ("RemoteWindows")] + [TestCase (ApplePlatform.iOS, "ios-arm64")] + [TestCase (ApplePlatform.iOS, "iossimulator-arm64;iossimulator-x64")] + public void PluralRuntimeIdentifiersWithRemoteMac_CoreCLR (ApplePlatform platform, string runtimeIdentifiers) + { + var properties = AddRemoteProperties (); + DotNetProjectTest.PluralRuntimeIdentifiersImpl (platform, runtimeIdentifiers, useMonoRuntime: false, extraProperties: properties); } [Category ("RemoteWindows")] From 5190dfeac0342725e2b25bdae596c1430c37e92a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 3 Apr 2026 11:38:12 +0200 Subject: [PATCH 14/25] Split CodeChangeSkipsTargets into Mono/CoreCLR variants With CoreCLR, C# changes don't trigger native re-linking because R2R output is a separate framework (not an input to _LinkNativeExecutable). This is different from MonoVM behavior where AOT .o files are linked into the native executable. Split CodeChangeSkipsTargets and CodeChangeSkipsTargetsOnRemoteWindows into _Mono and _CoreCLR variants to handle this difference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../dotnet/UnitTests/IncrementalBuildTest.cs | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/tests/dotnet/UnitTests/IncrementalBuildTest.cs b/tests/dotnet/UnitTests/IncrementalBuildTest.cs index fbe0736b6bc1..6449b34d0155 100644 --- a/tests/dotnet/UnitTests/IncrementalBuildTest.cs +++ b/tests/dotnet/UnitTests/IncrementalBuildTest.cs @@ -100,6 +100,7 @@ public void NativeLink (ApplePlatform platform, string runtimeIdentifiers) var project_path = GenerateProject (platform, name: nameof (NativeLink), runtimeIdentifiers: runtimeIdentifiers, out var appPath); var properties = new Dictionary (verbosity); + properties ["UseMonoRuntime"] = "true"; // this test is only applicable to Mono. SetRuntimeIdentifiers (properties, runtimeIdentifiers); var mainContents = @" @@ -190,19 +191,37 @@ public void Interpreter (ApplePlatform platform, string runtimeIdentifiers) [Test] [TestCase (ApplePlatform.iOS, "iossimulator-arm64", true)] [TestCase (ApplePlatform.iOS, "iossimulator-arm64", false)] - public void CodeChangeSkipsTargets (ApplePlatform platform, string runtimeIdentifiers, bool interpreterEnabled) + public void CodeChangeSkipsTargets_Mono (ApplePlatform platform, string runtimeIdentifiers, bool interpreterEnabled) { - CodeChangeSkipsTargetsImpl (platform, runtimeIdentifiers, interpreterEnabled); + CodeChangeSkipsTargetsImpl (platform, runtimeIdentifiers, useMonoRuntime: true, interpreterEnabled: interpreterEnabled); + } + + [Test] + [TestCase (ApplePlatform.iOS, "iossimulator-arm64")] + public void CodeChangeSkipsTargets_CoreCLR (ApplePlatform platform, string runtimeIdentifiers) + { + // With CoreCLR, C# changes don't affect native linking (R2R output is a separate + // framework, not an input to _LinkNativeExecutable), so the target is always skipped. + CodeChangeSkipsTargetsImpl (platform, runtimeIdentifiers, useMonoRuntime: false, interpreterEnabled: false); } [Test] [Category ("RemoteWindows")] [TestCase (ApplePlatform.iOS, "iossimulator-arm64", true)] [TestCase (ApplePlatform.iOS, "iossimulator-arm64", false)] - public void CodeChangeSkipsTargetsOnRemoteWindows (ApplePlatform platform, string runtimeIdentifiers, bool interpreterEnabled) + public void CodeChangeSkipsTargetsOnRemoteWindows_Mono (ApplePlatform platform, string runtimeIdentifiers, bool interpreterEnabled) + { + Configuration.IgnoreIfNotOnWindows (); + CodeChangeSkipsTargetsImpl (platform, runtimeIdentifiers, useMonoRuntime: true, interpreterEnabled: interpreterEnabled); + } + + [Test] + [Category ("RemoteWindows")] + [TestCase (ApplePlatform.iOS, "iossimulator-arm64")] + public void CodeChangeSkipsTargetsOnRemoteWindows_CoreCLR (ApplePlatform platform, string runtimeIdentifiers) { Configuration.IgnoreIfNotOnWindows (); - CodeChangeSkipsTargetsImpl (platform, runtimeIdentifiers, interpreterEnabled); + CodeChangeSkipsTargetsImpl (platform, runtimeIdentifiers, useMonoRuntime: false, interpreterEnabled: false); } [Test] @@ -256,7 +275,7 @@ kernel void myKernel (texture2d inTexture [[texture(0)]], AssertTargetNotExecuted (allTargets, "_TemperMetal", "Second build"); } - void CodeChangeSkipsTargetsImpl (ApplePlatform platform, string runtimeIdentifiers, bool interpreterEnabled) + void CodeChangeSkipsTargetsImpl (ApplePlatform platform, string runtimeIdentifiers, bool useMonoRuntime, bool interpreterEnabled) { var project = "IncrementalTestApp"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -266,6 +285,7 @@ void CodeChangeSkipsTargetsImpl (ApplePlatform platform, string runtimeIdentifie Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; properties ["UseInterpreter"] = interpreterEnabled.ToString (); properties ["MtouchLink"] = "None"; @@ -288,9 +308,12 @@ void CodeChangeSkipsTargetsImpl (ApplePlatform platform, string runtimeIdentifie // Verify these targets did NOT execute on incremental build after C# change AssertTargetNotExecuted (allTargets, "_CreatePkgInfo", "B"); AssertTargetNotExecuted (allTargets, "_CompileNativeExecutable", "B"); - if (interpreterEnabled) { + if (interpreterEnabled || !useMonoRuntime) { + // With interpreter enabled, or with CoreCLR (where C# changes don't affect + // native linking), _LinkNativeExecutable should be skipped. AssertTargetNotExecuted (allTargets, "_LinkNativeExecutable", "B"); } else { + // Without interpreter on MonoVM: AOT output changes, forcing a native re-link. AssertTargetExecuted (allTargets, "_LinkNativeExecutable", "B"); } } From 59d0ab47f5c203b63cf0a1d9a758b975819610fe Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 3 Apr 2026 11:51:54 +0200 Subject: [PATCH 15/25] Split BuildIpaTest into Mono/CoreCLR variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With CoreCLR (R2R), assemblies retain their IL bodies — they are not stripped the way MonoVM AOT strips method bodies. Split BuildIpaTest into _Mono and _CoreCLR variants and pass shouldStrip accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet/UnitTests/PostBuildTest.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/dotnet/UnitTests/PostBuildTest.cs b/tests/dotnet/UnitTests/PostBuildTest.cs index c03a488b39c0..ee6c06040819 100644 --- a/tests/dotnet/UnitTests/PostBuildTest.cs +++ b/tests/dotnet/UnitTests/PostBuildTest.cs @@ -51,7 +51,20 @@ public void ArchiveTest (ApplePlatform platform, string runtimeIdentifiers) [Test] [TestCase (ApplePlatform.iOS, "ios-arm64")] [TestCase (ApplePlatform.TVOS, "tvos-arm64")] - public void BuildIpaTest (ApplePlatform platform, string runtimeIdentifiers) + public void BuildIpaTest_Mono (ApplePlatform platform, string runtimeIdentifiers) + { + BuildIpaTestImpl (platform, runtimeIdentifiers, useMonoRuntime: true); + } + + [Test] + [TestCase (ApplePlatform.iOS, "ios-arm64")] + [TestCase (ApplePlatform.TVOS, "tvos-arm64")] + public void BuildIpaTest_CoreCLR (ApplePlatform platform, string runtimeIdentifiers) + { + BuildIpaTestImpl (platform, runtimeIdentifiers, useMonoRuntime: false); + } + + void BuildIpaTestImpl (ApplePlatform platform, string runtimeIdentifiers, bool useMonoRuntime) { var project = "MySimpleApp"; var configuration = "Release"; @@ -63,13 +76,16 @@ public void BuildIpaTest (ApplePlatform platform, string runtimeIdentifiers) var properties = GetDefaultProperties (runtimeIdentifiers); properties ["BuildIpa"] = "true"; properties ["Configuration"] = configuration; + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; DotNet.AssertBuild (project_path, properties); var pkgPath = Path.Combine (appPath, "..", $"{project}.ipa"); Assert.That (pkgPath, Does.Exist, "pkg creation"); - AssertBundleAssembliesStripStatus (appPath, true); + // With MonoVM, AOT compiles method bodies to native code and IL gets stripped. + // With CoreCLR (R2R), assemblies retain their IL bodies. + AssertBundleAssembliesStripStatus (appPath, useMonoRuntime); AssertDSymDirectory (appPath); } From c5b64cffc77a3a9b07696b201ebf0c14eb79b683 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 6 Apr 2026 10:38:13 +0200 Subject: [PATCH 16/25] [tests] IncrementalBuildTest.Interpreter is mono-only. --- tests/dotnet/UnitTests/IncrementalBuildTest.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/dotnet/UnitTests/IncrementalBuildTest.cs b/tests/dotnet/UnitTests/IncrementalBuildTest.cs index 6449b34d0155..dfab54d52f42 100644 --- a/tests/dotnet/UnitTests/IncrementalBuildTest.cs +++ b/tests/dotnet/UnitTests/IncrementalBuildTest.cs @@ -153,6 +153,8 @@ public void Interpreter (ApplePlatform platform, string runtimeIdentifiers) Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); + properties ["UseMonoRuntime"] = "true"; // only applicable when using MonoVM. + // Build with the interpreter disabled properties ["UseInterpreter"] = "false"; DotNet.AssertBuild (project_path, properties); From 0e8a8831688a0e53c8b9fbc4b64adbf7463ead33 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 6 Apr 2026 10:51:55 +0200 Subject: [PATCH 17/25] Split IncrementalBuildTest.Link by runtime CoreCLR and MonoVM differ in incremental link behavior for the Link unit test. MonoVM skips _LinkNativeExecutable on the no-op rebuild, but CoreCLR re-links because the generated R2R framework participates in the native link inputs and gets refreshed on each build. Split the test into _Mono and _CoreCLR variants and adjust the expected link/timestamp assertions accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../dotnet/UnitTests/IncrementalBuildTest.cs | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/tests/dotnet/UnitTests/IncrementalBuildTest.cs b/tests/dotnet/UnitTests/IncrementalBuildTest.cs index dfab54d52f42..3adb664b3c4f 100644 --- a/tests/dotnet/UnitTests/IncrementalBuildTest.cs +++ b/tests/dotnet/UnitTests/IncrementalBuildTest.cs @@ -7,7 +7,20 @@ public class IncrementalBuildTest : TestBaseClass { [Test] // this test is fairly slow, so execute on one arch only [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64")] - public void Link (ApplePlatform platform, string runtimeIdentifiers) + public void Link_Mono (ApplePlatform platform, string runtimeIdentifiers) + { + LinkImpl (platform, runtimeIdentifiers, useMonoRuntime: true); + } + + [Test] + // this test is fairly slow, so execute on one arch only + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64")] + public void Link_CoreCLR (ApplePlatform platform, string runtimeIdentifiers) + { + LinkImpl (platform, runtimeIdentifiers, useMonoRuntime: false); + } + + void LinkImpl (ApplePlatform platform, string runtimeIdentifiers, bool useMonoRuntime) { var project = "IncrementalTestApp"; Configuration.IgnoreIfIgnoredPlatform (platform); @@ -17,10 +30,13 @@ public void Link (ApplePlatform platform, string runtimeIdentifiers) Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); - properties ["UseInterpreter"] = "true"; // this makes the test faster + properties ["UseMonoRuntime"] = useMonoRuntime ? "true" : "false"; + properties ["UseInterpreter"] = "true"; // this makes the test faster on MonoVM and is ignored by CoreCLR // Build the first time - DotNet.AssertBuild (project_path, properties); + var rv = DotNet.AssertBuild (project_path, properties); + var allTargets = BinLog.GetAllTargets (rv.BinLogPath); + AssertTargetExecuted (allTargets, "_LinkNativeExecutable", "A"); // Make sure it runs successfully (if on desktop) var appExecutable = GetNativeExecutable (platform, appPath); @@ -36,7 +52,9 @@ public void Link (ApplePlatform platform, string runtimeIdentifiers) // Build again, adding a package with frameworks properties ["IncludeFwInRuntimesNativeDirectory"] = "true"; - DotNet.AssertBuild (project_path, properties); + rv = DotNet.AssertBuild (project_path, properties); + allTargets = BinLog.GetAllTargets (rv.BinLogPath); + AssertTargetExecuted (allTargets, "_LinkNativeExecutable", "B"); // Executing should work just fine ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); @@ -53,7 +71,15 @@ public void Link (ApplePlatform platform, string runtimeIdentifiers) appExecutableTimestamp = File.GetLastWriteTimeUtc (appExecutable); // Build again, not doing anything - DotNet.AssertBuild (project_path, properties); + rv = DotNet.AssertBuild (project_path, properties); + allTargets = BinLog.GetAllTargets (rv.BinLogPath); + if (useMonoRuntime) { + AssertTargetNotExecuted (allTargets, "_LinkNativeExecutable", "C"); + } else { + // With CoreCLR, the app executable is re-linked because the generated R2R + // framework participates in the native link inputs and is refreshed each build. + AssertTargetExecuted (allTargets, "_LinkNativeExecutable", "C"); + } // Executing should work just fine ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); @@ -63,12 +89,18 @@ public void Link (ApplePlatform platform, string runtimeIdentifiers) Assert.That (lc_load_dylib, Does.Contain ("@rpath/FrameworksInRuntimesNativeDirectory1.framework/FrameworksInRuntimesNativeDirectory1"), "C: Should link with @rpath/FrameworksInRuntimesNativeDirectory1.framework/FrameworksInRuntimesNativeDirectory1"); Assert.That (lc_load_dylib, Does.Contain ("@rpath/FrameworksInRuntimesNativeDirectory2.framework/FrameworksInRuntimesNativeDirectory2"), "C: Should link with @rpath/FrameworksInRuntimesNativeDirectory2.framework/FrameworksInRuntimesNativeDirectory2"); - // The main executable must not be modified - Assert.That (File.GetLastWriteTimeUtc (appExecutable), Is.EqualTo (appExecutableTimestamp), "Modified C"); + if (useMonoRuntime) { + Assert.That (File.GetLastWriteTimeUtc (appExecutable), Is.EqualTo (appExecutableTimestamp), "Modified C"); + } else { + Assert.That (File.GetLastWriteTimeUtc (appExecutable), Is.GreaterThan (appExecutableTimestamp), "Modified C"); + appExecutableTimestamp = File.GetLastWriteTimeUtc (appExecutable); + } // Build yet again, now removing the package properties.Remove ("IncludeFwInRuntimesNativeDirectory"); - DotNet.AssertBuild (project_path, properties); + rv = DotNet.AssertBuild (project_path, properties); + allTargets = BinLog.GetAllTargets (rv.BinLogPath); + AssertTargetExecuted (allTargets, "_LinkNativeExecutable", "D"); // Executing should work just fine ExecuteWithMagicWordAndAssert (platform, runtimeIdentifiers, appExecutable); From c3ec0b904bb8dfd3048d27c5c847a77902434324 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 6 Apr 2026 15:51:19 +0200 Subject: [PATCH 18/25] Fix multi-RID CoreCLR publish and split PublishTest by runtime CoreCLR defaults PublishReadyToRun=true, which made multi-RID publish hit NETSDK1191 in the outer build because the SDK asserted that a singular RuntimeIdentifier was required. Allow ReadyToRun without a singular RID for outer multi-RID publishes, similar to the existing NativeAOT/self- contained escape hatches. Also split PostBuildTest.PublishTest into _Mono and _CoreCLR variants so runtime expectations are explicit now that CoreCLR is the default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/targets/Xamarin.Shared.Sdk.props | 1 + tests/dotnet/UnitTests/PostBuildTest.cs | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index a618590911c8..94cbc23291d4 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -89,6 +89,7 @@ true + true true