Ver código fonte

Merge pull request #103714 from raulsntos/dotnet/skip-resaving-when-tfm-unchanged

[.NET] Skip re-saving `.csproj` when TFM is unchanged
Thaddeus Crews 6 meses atrás
pai
commit
f002258454

+ 7 - 0
modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs

@@ -191,6 +191,13 @@ namespace GodotTools.ProjectEditor
                 // Otherwise, it can be removed.
                 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;
                 }
                 else