refactor WorkspaceContext (#2736)

this removes a regression in ProjectModelServer behavior

also added a test to cover target framework change in DTH
This commit is contained in:
Troy Dai 2016-05-02 11:32:24 -07:00 committed by Andrew Stanton-Nurse
parent 2e22c3ac4b
commit f32683cbab
35 changed files with 821 additions and 635 deletions

View file

@ -29,7 +29,7 @@ namespace Microsoft.DotNet.Tools.Run
ProjectContext _context;
List<string> _args;
private WorkspaceContext _workspace;
private BuildWorkspace _workspace;
public int Start()
{
@ -113,7 +113,7 @@ namespace Microsoft.DotNet.Tools.Run
private int RunExecutable()
{
// Set up the workspace
_workspace = WorkspaceContext.Create(ProjectReaderSettings.ReadFromEnvironment(), designTime: false);
_workspace = new BuildWorkspace(ProjectReaderSettings.ReadFromEnvironment());
CalculateDefaultsForNonAssigned();
@ -125,7 +125,7 @@ namespace Microsoft.DotNet.Tools.Run
$"--configuration",
Configuration,
$"{_context.ProjectFile.ProjectDirectory}"
});
}, _workspace);
if (result != 0)
{