1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

[.NET] Skip re-saving .csproj when TFM is unchanged

Avoids updating the platform-specific `TargetFramework` properties if they already match the minimum required version.
This commit is contained in:
Raul Santos
2025-03-06 18:44:15 +01:00
parent 9f68a81659
commit 57d5b664d3

View File

@@ -191,6 +191,13 @@ namespace GodotTools.ProjectEditor
// Otherwise, it can be removed. // Otherwise, it can be removed.
if (mainTfmVersion > minTfmVersion) if (mainTfmVersion > minTfmVersion)
{ {
var propertyTfmVersion = NuGetFramework.Parse(property.Value).Version;
if (propertyTfmVersion == minTfmVersion)
{
// The 'TargetFramework' property already matches the minimum version.
continue;
}
property.Value = minTfmValue; property.Value = minTfmValue;
} }
else else