File tree 2 files changed +33
-0
lines changed
src/tests/Loader/ExternalAssemblyProbe 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+ using System ;
5
+ using Xunit ;
6
+
7
+ [ ConditionalClass ( typeof ( TestLibrary . Utilities ) , nameof ( TestLibrary . Utilities . IsNotNativeAot ) ) ]
8
+ public unsafe class ExternalAssemblyProbe
9
+ {
10
+ [ Fact ]
11
+ [ SkipOnMono ( "External assembly probe via host-runtime contract is not implemented" ) ]
12
+ public static void ExternalAppAssemblies ( )
13
+ {
14
+ // In order to get to this point, the runtime must have been able to find the app assemblies
15
+ // Check that the TPA is indeed empty - that is, the runtime is not relying on that property.
16
+ string tpa = AppContext . GetData ( "TRUSTED_PLATFORM_ASSEMBLIES" ) as string ;
17
+ Assert . True ( string . IsNullOrEmpty ( tpa ) , "TRUSTED_PLATFORM_ASSEMBLIES should be empty" ) ;
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+ <PropertyGroup >
3
+ <!-- Needed for CLRTestEnvironmentVariable -->
4
+ <RequiresProcessIsolation >true</RequiresProcessIsolation >
5
+ </PropertyGroup >
6
+ <ItemGroup >
7
+ <Compile Include =" ExternalAssemblyProbe.cs" />
8
+
9
+ <CLRTestEnvironmentVariable Include =" APP_ASSEMBLIES" Value =" EXTERNAL" />
10
+ </ItemGroup >
11
+ <ItemGroup >
12
+ <ProjectReference Include =" $(TestLibraryProjectPath)" />
13
+ </ItemGroup >
14
+ </Project >
You can’t perform that action at this time.
0 commit comments