Last active
August 29, 2015 14:27
-
-
Save davidfowl/413a522d3858eec4be39 to your computer and use it in GitHub Desktop.
LoadContext strikes again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A (project) -> B (package) | |
(build)-> CustomCompiler (project) (build)-> FSharpCompiler (project) -> System.Runtime (package) | |
public interface ILoadContextProvider { | |
IAssemblyLoadContext GetLoadContext(Project project, FrameworkName targetFramework); | |
} | |
var loadContextProvider = ... | |
Compile(A) | |
var compiler = GetCompiler(A) | |
var blc = loadContextProvider.GetLoadContext(A, framework) | |
blc.Load(CustomCompiler) | |
var compiler = GetCompiler(CustomCompiler) | |
var blc2 = loadContextProvider.GetLoadContext(CustomCompiler, framework) | |
blc2.Load(FSharpCompiler) | |
var compiler = GetCompiler(FSharpCompiler) | |
var blc3 = loadContextProvider.GetLoadContext(FSharpCompiler, framework) | |
blc3.Load(Microsoft.Dnx.Compilation.CSharp) | |
blc3.Load(System.Runtime) | |
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