Microsoft.NET.Sdk.Web.Assembly.LoadFile/Assembly.LoadFrom works fine. GetTypes()) a System.Reflection.ReflectionTypeLoadException is thrown because one of the assemblies (e.g. Microsoft.Extensions.Hosting.Abstractions) cannot be located. It throws for multiple referenced assemblies, but all of these are included with the project SDK, yet don't appear in the output directory of the assembly unless I specifically publish as self-contained application, which is of no use here.Types property of the ReflectionTypeLoadException, but I'd rather not get the exception at all.