}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32436", TestRuntimes.Mono)]
public static void LoadAssemblyByPath_ValidUserAssembly()
{
var asmName = new AssemblyName(TestAssembly);
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32437", TestRuntimes.Mono)]
public static void LoadAssemblyByStream_ValidUserAssembly()
{
var asmName = new AssemblyName(TestAssembly);
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32435", TestRuntimes.Mono)]
public static void LoadFromAssemblyName_AssemblyNotFound()
{
var asmName = new AssemblyName("Non.Existing.Assembly.dll");
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32439", TestRuntimes.Mono)]
public static void LoadFromAssemblyName_ValidTrustedPlatformAssembly()
{
var asmName = typeof(System.Linq.Enumerable).Assembly.GetName();
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32434", TestRuntimes.Mono)]
public static void GetLoadContextTest_ValidUserAssembly()
{
var asmName = new AssemblyName(TestAssembly);
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32433", TestRuntimes.Mono)]
public void LoadInDefaultContext()
{
// This will attempt to load an assembly, by path, in the Default Load context via the Resolving event
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/runtime/issues/32432", TestRuntimes.Mono)]
public static void LoadNonExistentInDefaultContext()
{
// Now, try to load an assembly that does not exist
internal static RuntimeAssembly InternalLoad (AssemblyName assemblyRef, ref StackCrawlMark stackMark, AssemblyLoadContext assemblyLoadContext)
{
- // TODO: Use assemblyLoadContext
- return (RuntimeAssembly) InternalLoad (assemblyRef.FullName, ref stackMark, IntPtr.Zero);
+ var assembly = (RuntimeAssembly) InternalLoad (assemblyRef.FullName, ref stackMark, assemblyLoadContext != null ? assemblyLoadContext.NativeALC : IntPtr.Zero);
+ if (assembly == null)
+ throw new FileNotFoundException (null, assemblyRef.Name);
+ return assembly;
}
// FIXME: Merge some of these