From 245caa6e5cd1ae78afddcb279ffa30b43d04b030 Mon Sep 17 00:00:00 2001 From: Kai Angulo Date: Tue, 8 Oct 2024 14:38:57 -0700 Subject: [PATCH] fix: modify name of interfering csproj attribute --- Prowl.Editor/Project/ProjectCompiler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Prowl.Editor/Project/ProjectCompiler.cs b/Prowl.Editor/Project/ProjectCompiler.cs index 7bc01332f..91c6b92fd 100644 --- a/Prowl.Editor/Project/ProjectCompiler.cs +++ b/Prowl.Editor/Project/ProjectCompiler.cs @@ -70,7 +70,7 @@ private static void Override(XElement node, XElement newNode) private static XElement FindOrCreate(XElement parent, XElement node) { XElement? match = parent.Elements(node.Name) - .First(x => node.Attributes().All(y => x.Attribute(y.Name)?.Value == y.Value)); + .FirstOrDefault(x => node.Attributes().All(y => x.Attribute(y.Name)?.Value == y.Value)); if (match == null) { @@ -155,7 +155,7 @@ public static void GenerateCSProject( XElement propertyGroupXML = FindOrCreate(projectXML, new XElement("PropertyGroup", - new XAttribute("ID", "Compile") + new XAttribute("Label", "Compile") ) ); @@ -172,7 +172,7 @@ public static void GenerateCSProject( XElement scriptsXML = FindOrCreate(projectXML, new XElement("ItemGroup", - new XAttribute("ID", "Compile") + new XAttribute("Label", "Compile") ) ); @@ -186,7 +186,7 @@ public static void GenerateCSProject( XElement referencesXML = FindOrCreate(projectXML, new XElement("ItemGroup", - new XAttribute("ID", "References") + new XAttribute("Label", "References") ) );