Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save davidfowl/413a522d3858eec4be39 to your computer and use it in GitHub Desktop.
LoadContext strikes again
A (project) -> B (package)
(build)-> CustomCompiler (project) (build)-> FSharpCompiler (project) -> System.Runtime (package)
public interface ILoadContextProvider {
IAssemblyLoadContext GetLoadContext(Project project, FrameworkName targetFramework);
var loadContextProvider = ...
var compiler = GetCompiler(A)
var blc = loadContextProvider.GetLoadContext(A, framework)
var compiler = GetCompiler(CustomCompiler)
var blc2 = loadContextProvider.GetLoadContext(CustomCompiler, framework)
var compiler = GetCompiler(FSharpCompiler)
var blc3 = loadContextProvider.GetLoadContext(FSharpCompiler, framework)
var a = compiler.Compile(A, GetReferences(A))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment