From d46b44b24d12f0ae227f788d7557b2e65fb15463 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:23:57 +0000 Subject: [PATCH 1/3] Skip AssemblyLoadContext tests using Assembly.Location on mobile These tests fail on mobile platforms because Assembly.Location returns an empty string. On mobile, assemblies are loaded from the APK/app bundle, not from individual files. Fixes failures discovered in build #1383320: - InvalidCastException_DifferentALC_ShowsAssemblyInfo - InvalidCastException_GenericTypeArg_DifferentALC_ShowsAssemblyInfo Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../System.Runtime.Loader/tests/AssemblyLoadContextTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs b/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs index 31af15049c26ec..a8697f2e93b39b 100644 --- a/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs @@ -277,7 +277,7 @@ public static void LoadNonRuntimeAssembly() Assert.IsType(error.InnerException); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.IsNotMobile))] public static void InvalidCastException_DifferentALC_ShowsAssemblyInfo() { var alc = new AssemblyLoadContext("TestALC"); @@ -298,7 +298,7 @@ public static void InvalidCastException_DifferentALC_ShowsAssemblyInfo() Assert.Contains("TestALC", ice.Message); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.IsNotMobile))] public static void InvalidCastException_GenericTypeArg_DifferentALC_ShowsAssemblyInfo() { var alc = new AssemblyLoadContext("TestALC"); From de70d45475e33ed9aa6ca1efd8752c1bffe27d37 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Apr 2026 13:24:02 +0000 Subject: [PATCH 2/3] ci: trigger checks From 9ae70e3162ed136ad0b87d13838b7385c3988799 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:44:47 +0000 Subject: [PATCH 3/3] Use HasAssemblyFiles instead of IsNotMobile for ALC tests using Assembly.Location Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/a80757bd-1d3b-4ee5-8794-14353d687456 Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com> --- .../System.Runtime.Loader/tests/AssemblyLoadContextTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs b/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs index a8697f2e93b39b..49a9046729f361 100644 --- a/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs @@ -277,7 +277,7 @@ public static void LoadNonRuntimeAssembly() Assert.IsType(error.InnerException); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.IsNotMobile))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.HasAssemblyFiles))] public static void InvalidCastException_DifferentALC_ShowsAssemblyInfo() { var alc = new AssemblyLoadContext("TestALC"); @@ -298,7 +298,7 @@ public static void InvalidCastException_DifferentALC_ShowsAssemblyInfo() Assert.Contains("TestALC", ice.Message); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.IsNotMobile))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsCoreCLR), nameof(PlatformDetection.HasAssemblyFiles))] public static void InvalidCastException_GenericTypeArg_DifferentALC_ShowsAssemblyInfo() { var alc = new AssemblyLoadContext("TestALC");