Skip to content

Commit 708f178

Browse files
committed
Ignore Target elements that don't have a name
It could be a task parameter or anything else really
1 parent f52ee31 commit 708f178

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/StructuredLogger/Analyzers/TargetGraph.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ public static TargetGraph ParseXml(string text, Dictionary<string, string> props
260260
foreach (var target in targets)
261261
{
262262
var name = GetAttribute(target, "Name");
263+
if (string.IsNullOrWhiteSpace(name))
264+
{
265+
continue;
266+
}
267+
263268
var beforeTargetsText = GetAttribute(target, "BeforeTargets");
264269
var afterTargetsText = GetAttribute(target, "AfterTargets");
265270
var dependsOnTargetsText = GetAttribute(target, "DependsOnTargets");

0 commit comments

Comments
 (0)