align code in dotnet-run (#2679)
we used to use different code when --framework was specified than when it was not specified, this synchronizes them to use the same code path which removes a hidden NullRef also adds tests to cover both cases
This commit is contained in:
parent
06f57c5c81
commit
a729b97b35
5 changed files with 44 additions and 78 deletions
|
@ -220,7 +220,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
|
|||
}
|
||||
|
||||
var workspace = WorkspaceContext.Create(ProjectReaderSettings.ReadFromEnvironment(), designTime: false);
|
||||
var context = workspace.GetProjectContext(projectJson, TestAssetFramework, rids);
|
||||
var context = workspace.GetRuntimeContext(workspace.GetProjectContext(projectJson, TestAssetFramework), rids);
|
||||
context = workspace.GetRuntimeContext(context, rids);
|
||||
managedCompiler.Compile(context, _args);
|
||||
|
||||
RuntimeOutputDir = Path.Combine(OutputPath, rid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue