Fix dependency context bugs
This commit is contained in:
parent
592fef980c
commit
2d4fe4bc10
3 changed files with 19 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue