public static BindOperation ContextualReflection_DefaultToCustomALC() { Type t; CustomALC alc = new CustomALC(nameof(ContextualReflection_DefaultToCustomALC)); using (alc.EnterContextualReflection()) { t = GetDependentAssemblyType(); } return new BindOperation() { AssemblyName = new AssemblyName(DependentAssemblyName), AssemblyLoadContext = alc.ToString(), RequestingAssembly = Assembly.GetExecutingAssembly().GetName(), RequestingAssemblyLoadContext = DefaultALC, Success = true, ResultAssemblyName = t.Assembly.GetName(), ResultAssemblyPath = t.Assembly.Location, Cached = false, }; }