Skip to content

Commit

Permalink
Merge pull request #9643 from dhoehna/main
Browse files Browse the repository at this point in the history
Fixing a comment and moving one line of code
  • Loading branch information
adamint authored Feb 10, 2025
2 parents 65326e9 + 17538d2 commit 5beaa30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static void AppendPropertyValue(ProjectRootElement project, string evalua
}

/// <summary>
/// Renames a value inside a delimited property.
/// Removes a value inside a delimited property.
/// </summary>
/// <param name="project">Xml representation of the MsBuild project.</param>
/// <param name="evaluatedPropertyValue">Original evaluated value of the property.</param>
Expand All @@ -126,7 +126,6 @@ public static void RemovePropertyValue(ProjectRootElement project, string evalua
Requires.NotNull(evaluatedPropertyValue);
Requires.NotNullOrEmpty(propertyName);

ProjectPropertyElement property = GetOrAddProperty(project, propertyName);
var newValue = new StringBuilder();
bool valueFound = false;
foreach (string value in GetPropertyValues(evaluatedPropertyValue))
Expand All @@ -146,6 +145,7 @@ public static void RemovePropertyValue(ProjectRootElement project, string evalua
}
}

ProjectPropertyElement property = GetOrAddProperty(project, propertyName);
property.Value = newValue.ToString();

if (!valueFound)
Expand Down

0 comments on commit 5beaa30

Please sign in to comment.