Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit cee066a

Browse files
fix: check that Reference tag contains Include attribute
1 parent 8b13231 commit cee066a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Common/ProjectFile.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public bool ContainsRef(string reference, out XmlNode refXml)
8282
refXml = Document
8383
.GetElementsByTagName("Reference")
8484
.Cast<XmlNode>()
85-
.FirstOrDefault(node => node.Attributes?["Include"].Value != null && node.Attributes["Include"].Value.Split(',').First().Trim() == reference);
85+
.FirstOrDefault(node => node.Attributes?["Include"]?.Value != null && node.Attributes["Include"].Value.Split(',').First().Trim() == reference);
8686
return refXml != null;
8787
}
8888

0 commit comments

Comments
 (0)