Merge pull request #1501 from dotnet/pakrym/run-single-target

Fix run behaviour when only single target exists
This commit is contained in:
Pavel Krymets 2016-02-22 20:34:23 -08:00
commit f49fdd9197
15 changed files with 197 additions and 7 deletions

View file

@ -114,10 +114,10 @@ namespace Microsoft.DotNet.Cli.Build
public static BuildTargetResult BuildTestAssetProjects(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage2;
var nobuildFileName = ".noautobuild";
string testProjectsRoot = Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects");
List<string> exclusionList = new List<string> { Path.Combine(testProjectsRoot, "CompileFail", "project.json") };
var projects = Directory.GetFiles(testProjectsRoot, "project.json", SearchOption.AllDirectories)
.Where(p => !exclusionList.Any(e => e.Contains(p)));
.Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), nobuildFileName)));
foreach (var project in projects)
{