Fix dependency context bugs

This commit is contained in:
Pavel Krymets 2016-01-08 09:02:04 -08:00
parent 592fef980c
commit 2d4fe4bc10
3 changed files with 19 additions and 9 deletions

View file

@ -250,13 +250,10 @@ namespace Microsoft.DotNet.Tools.Compiler
compilerArgs.AddRange(references.Select(r => $"--reference:{r}"));
var runtimeContext = ProjectContext.Create(context.ProjectDirectory, context.TargetFramework, new[] { RuntimeIdentifier.Current });
var libraryExporter = runtimeContext.CreateExporter(args.ConfigValue);
if (compilationOptions.PreserveCompilationContext == true)
{
var dependencyContext = DependencyContextBuilder.Build(compilationOptions,
libraryExporter,
exporter,
args.ConfigValue,
context.TargetFramework,
context.RuntimeIdentifier);