From 33eff0b42f0402a3072c1778d8ae2cec953bcf1e Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 11 Feb 2026 16:39:38 +0100 Subject: [PATCH 1/4] [net11.0] Eexclude debug libraries in Release builds --- dotnet/targets/Xamarin.Shared.Sdk.targets | 1 + .../Tasks/ProcessRuntimeLibraries.cs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index ca764998a48b..b067fcd06f55 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -2117,6 +2117,7 @@ Date: Wed, 11 Feb 2026 15:45:03 +0000 Subject: [PATCH 2/4] Auto-format source code --- msbuild/Xamarin.MacDev.Tasks/Tasks/ProcessRuntimeLibraries.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/ProcessRuntimeLibraries.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/ProcessRuntimeLibraries.cs index b2aa5d429c7a..0699fd439761 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/ProcessRuntimeLibraries.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/ProcessRuntimeLibraries.cs @@ -120,7 +120,7 @@ public override bool Execute () if (Platform != Utils.ApplePlatform.MacOSX && string.Equals (Configuration, "Release", StringComparison.OrdinalIgnoreCase)) { // libmscordaccore and libmscordbi are debug-only libraries, don't include them in Release builds on mobile platforms if (string.Equals (kvp.Key, "libmscordaccore", StringComparison.OrdinalIgnoreCase) || - string.Equals (kvp.Key, "libmscordbi", StringComparison.OrdinalIgnoreCase)) { + string.Equals (kvp.Key, "libmscordbi", StringComparison.OrdinalIgnoreCase)) { continue; } } From 48a97432fca0dff6d31f1197e95a60b98cb6a105 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Thu, 12 Feb 2026 11:01:35 +0100 Subject: [PATCH 3/4] Add DebuggerSupport property to ProcessRuntimeLibraries task and update logic to exclude debug libraries in Release builds --- dotnet/targets/Xamarin.Shared.Sdk.targets | 2 +- .../Xamarin.MacDev.Tasks/Tasks/ProcessRuntimeLibraries.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index b067fcd06f55..b4e6fdc61fa8 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -2117,7 +2117,7 @@ Date: Fri, 13 Feb 2026 10:49:35 +0100 Subject: [PATCH 4/4] Update sizes. --- .../expected/iOS-CoreCLR-Interpreter-size.txt | 26 +++++++---------- .../expected/iOS-CoreCLR-R2R-size.txt | 28 ++++++++----------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt b/tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt index aa17a1e04607..2699b89f082e 100644 --- a/tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt +++ b/tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt @@ -1,36 +1,30 @@ -AppBundleSize: 14,891,359 bytes (14,542.3 KB = 14.2 MB) +AppBundleSize: 10,731,194 bytes (10,479.7 KB = 10.2 MB) # The following list of files and their sizes is just informational / for review, and isn't used in the test: -_CodeSignature/CodeResources: 12,587 bytes (12.3 KB = 0.0 MB) +_CodeSignature/CodeResources: 10,847 bytes (10.6 KB = 0.0 MB) archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB) Frameworks/libcoreclr.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libcoreclr.framework/Info.plist: 819 bytes (0.8 KB = 0.0 MB) +Frameworks/libcoreclr.framework/Info.plist: 820 bytes (0.8 KB = 0.0 MB) Frameworks/libcoreclr.framework/libcoreclr: 6,629,392 bytes (6,474.0 KB = 6.3 MB) -Frameworks/libmscordaccore.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libmscordaccore.framework/Info.plist: 831 bytes (0.8 KB = 0.0 MB) -Frameworks/libmscordaccore.framework/libmscordaccore: 2,289,360 bytes (2,235.7 KB = 2.2 MB) -Frameworks/libmscordbi.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libmscordbi.framework/Info.plist: 821 bytes (0.8 KB = 0.0 MB) -Frameworks/libmscordbi.framework/libmscordbi: 1,863,920 bytes (1,820.2 KB = 1.8 MB) Frameworks/libSystem.Globalization.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Globalization.Native.framework/Info.plist: 861 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.Globalization.Native.framework/Info.plist: 862 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.Globalization.Native.framework/libSystem.Globalization.Native: 110,608 bytes (108.0 KB = 0.1 MB) Frameworks/libSystem.IO.Compression.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 863 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 864 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native: 1,467,440 bytes (1,433.0 KB = 1.4 MB) Frameworks/libSystem.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Native.framework/Info.plist: 833 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.Native.framework/Info.plist: 834 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.Native.framework/libSystem.Native: 163,856 bytes (160.0 KB = 0.2 MB) Frameworks/libSystem.Net.Security.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 859 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 860 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native: 88,432 bytes (86.4 KB = 0.1 MB) Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 889 bytes (0.9 KB = 0.0 MB) +Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 890 bytes (0.9 KB = 0.0 MB) Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple: 224,080 bytes (218.8 KB = 0.2 MB) -Info.plist: 1,147 bytes (1.1 KB = 0.0 MB) +Info.plist: 1,148 bytes (1.1 KB = 0.0 MB) Microsoft.iOS.dll: 98,304 bytes (96.0 KB = 0.1 MB) PkgInfo: 8 bytes (0.0 KB = 0.0 MB) runtimeconfig.bin: 1,481 bytes (1.4 KB = 0.0 MB) -SizeTestApp: 197,344 bytes (192.7 KB = 0.2 MB) +SizeTestApp: 197,440 bytes (192.8 KB = 0.2 MB) SizeTestApp.dll: 7,680 bytes (7.5 KB = 0.0 MB) System.Collections.Immutable.dll: 14,848 bytes (14.5 KB = 0.0 MB) System.Diagnostics.StackTrace.dll: 8,192 bytes (8.0 KB = 0.0 MB) diff --git a/tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-size.txt b/tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-size.txt index 8f845db37204..35024fba2d39 100644 --- a/tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-size.txt +++ b/tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-size.txt @@ -1,39 +1,33 @@ -AppBundleSize: 24,990,321 bytes (24,404.6 KB = 23.8 MB) +AppBundleSize: 20,830,125 bytes (20,341.9 KB = 19.9 MB) # The following list of files and their sizes is just informational / for review, and isn't used in the test: -_CodeSignature/CodeResources: 13,441 bytes (13.1 KB = 0.0 MB) +_CodeSignature/CodeResources: 11,701 bytes (11.4 KB = 0.0 MB) archived-expanded-entitlements.xcent: 384 bytes (0.4 KB = 0.0 MB) Frameworks/libcoreclr.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libcoreclr.framework/Info.plist: 819 bytes (0.8 KB = 0.0 MB) +Frameworks/libcoreclr.framework/Info.plist: 820 bytes (0.8 KB = 0.0 MB) Frameworks/libcoreclr.framework/libcoreclr: 6,629,392 bytes (6,474.0 KB = 6.3 MB) -Frameworks/libmscordaccore.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libmscordaccore.framework/Info.plist: 831 bytes (0.8 KB = 0.0 MB) -Frameworks/libmscordaccore.framework/libmscordaccore: 2,289,360 bytes (2,235.7 KB = 2.2 MB) -Frameworks/libmscordbi.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libmscordbi.framework/Info.plist: 821 bytes (0.8 KB = 0.0 MB) -Frameworks/libmscordbi.framework/libmscordbi: 1,863,920 bytes (1,820.2 KB = 1.8 MB) Frameworks/libSystem.Globalization.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Globalization.Native.framework/Info.plist: 861 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.Globalization.Native.framework/Info.plist: 862 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.Globalization.Native.framework/libSystem.Globalization.Native: 110,608 bytes (108.0 KB = 0.1 MB) Frameworks/libSystem.IO.Compression.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 863 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.IO.Compression.Native.framework/Info.plist: 864 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.IO.Compression.Native.framework/libSystem.IO.Compression.Native: 1,467,440 bytes (1,433.0 KB = 1.4 MB) Frameworks/libSystem.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Native.framework/Info.plist: 833 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.Native.framework/Info.plist: 834 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.Native.framework/libSystem.Native: 163,856 bytes (160.0 KB = 0.2 MB) Frameworks/libSystem.Net.Security.Native.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 859 bytes (0.8 KB = 0.0 MB) +Frameworks/libSystem.Net.Security.Native.framework/Info.plist: 860 bytes (0.8 KB = 0.0 MB) Frameworks/libSystem.Net.Security.Native.framework/libSystem.Net.Security.Native: 88,432 bytes (86.4 KB = 0.1 MB) Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 889 bytes (0.9 KB = 0.0 MB) +Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/Info.plist: 890 bytes (0.9 KB = 0.0 MB) Frameworks/libSystem.Security.Cryptography.Native.Apple.framework/libSystem.Security.Cryptography.Native.Apple: 224,080 bytes (218.8 KB = 0.2 MB) Frameworks/SizeTestApp.framework/_CodeSignature/CodeResources: 1,798 bytes (1.8 KB = 0.0 MB) -Frameworks/SizeTestApp.framework/Info.plist: 822 bytes (0.8 KB = 0.0 MB) +Frameworks/SizeTestApp.framework/Info.plist: 823 bytes (0.8 KB = 0.0 MB) Frameworks/SizeTestApp.framework/SizeTestApp: 9,426,736 bytes (9,205.8 KB = 9.0 MB) -Info.plist: 1,147 bytes (1.1 KB = 0.0 MB) +Info.plist: 1,148 bytes (1.1 KB = 0.0 MB) Microsoft.iOS.dll: 163,840 bytes (160.0 KB = 0.2 MB) PkgInfo: 8 bytes (0.0 KB = 0.0 MB) runtimeconfig.bin: 1,481 bytes (1.4 KB = 0.0 MB) -SizeTestApp: 197,424 bytes (192.8 KB = 0.2 MB) +SizeTestApp: 197,488 bytes (192.9 KB = 0.2 MB) SizeTestApp.dll: 73,216 bytes (71.5 KB = 0.1 MB) System.Collections.Immutable.dll: 79,360 bytes (77.5 KB = 0.1 MB) System.Diagnostics.StackTrace.dll: 73,216 bytes (71.5 KB = 0.1 MB)