Skip to content

Commit 6e07ea4

Browse files
authored
Fix IsNonBundledAssemblyLoadingSupported condition in PlatformDetection (#73235)
Inadvertently put in a condition that only made tests with this check run in NativeAOT. The intent was to skip on both NativeAOT and Mono AOT.
1 parent 004c437 commit 6e07ea4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly()
153153
public static bool IsNotIntMaxValueArrayIndexSupported => s_largeArrayIsNotSupported.Value;
154154

155155
public static bool IsAssemblyLoadingSupported => !IsNativeAot;
156-
public static bool IsNonBundledAssemblyLoadingSupported => !IsAssemblyLoadingSupported && !IsMonoAOT;
156+
public static bool IsNonBundledAssemblyLoadingSupported => IsAssemblyLoadingSupported && !IsMonoAOT;
157157
public static bool IsMethodBodySupported => !IsNativeAot;
158158
public static bool IsDebuggerTypeProxyAttributeSupported => !IsNativeAot;
159159
public static bool HasAssemblyFiles => !string.IsNullOrEmpty(typeof(PlatformDetection).Assembly.Location);

src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ public void ExecuteAssemblyByName()
259259
}).Dispose();
260260
}
261261

262+
// In Mono AOT, loading assemblies can happen, but they need to be AOT'd and registered on startup. That is not the case
263+
// with TestAppOutsideOfTPA.exe
262264
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNonBundledAssemblyLoadingSupported))]
263265
public void ExecuteAssembly()
264266
{

0 commit comments

Comments
 (0)