Fix run behaviour when only single target exists
This commit is contained in:
parent
f81ba05a7c
commit
6ca22e4a56
15 changed files with 197 additions and 7 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue