Changing the API to create the MSBuild project to LoadProject and removing some non-existing paths from the RepoDirectoriesProvider.

This commit is contained in:
Livar Cunha 2016-10-17 08:43:47 -07:00
parent 391d04c67a
commit 3798102035
2 changed files with 4 additions and 10 deletions

View file

@ -77,10 +77,10 @@ namespace Microsoft.DotNet.Cli.Utils
globalProperties.Add("Configuration", configuration);
}
_project = ProjectCollection.GlobalProjectCollection.LoadedProjects.FirstOrDefault(p =>
p.FullPath == msBuildProjectPath);
_project = _project ?? new Project(msBuildProjectPath, globalProperties, null);
_project = ProjectCollection.GlobalProjectCollection.LoadProject(
msBuildProjectPath,
globalProperties,
null);
_msBuildExePath = msBuildExePath;
}

View file

@ -12,8 +12,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private string _artifacts;
private string _builtDotnet;
private string _nugetPackages;
private string _corehostPackages;
private string _corehostDummyPackages;
private string _stage2Sdk;
private string _testPackages;
@ -50,8 +48,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public string Artifacts => _artifacts;
public string BuiltDotnet => _builtDotnet;
public string NugetPackages => _nugetPackages;
public string CorehostPackages => _corehostPackages;
public string CorehostDummyPackages => _corehostDummyPackages;
public string Stage2Sdk => _stage2Sdk;
public string TestPackages => _testPackages;
@ -66,8 +62,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", currentRid);
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
_corehostPackages = corehostPackages ?? Path.Combine(_artifacts, "corehost");
_corehostDummyPackages = corehostDummyPackages ?? Path.Combine(_artifacts, "corehostdummypackages");
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
_stage2Sdk = Directory.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")).First();
_testPackages = Path.Combine(_artifacts, "tests", "packages");