Skip to content

Commit f002258

Browse files
committed
Merge pull request godotengine#103714 from raulsntos/dotnet/skip-resaving-when-tfm-unchanged
[.NET] Skip re-saving `.csproj` when TFM is unchanged
2 parents 4bafafa + 57d5b66 commit f002258

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ private static void EnsureTargetFrameworkMatchesMinimumRequirement(MSBuildProjec
191191
// Otherwise, it can be removed.
192192
if (mainTfmVersion > minTfmVersion)
193193
{
194+
var propertyTfmVersion = NuGetFramework.Parse(property.Value).Version;
195+
if (propertyTfmVersion == minTfmVersion)
196+
{
197+
// The 'TargetFramework' property already matches the minimum version.
198+
continue;
199+
}
200+
194201
property.Value = minTfmValue;
195202
}
196203
else

0 commit comments

Comments
 (0)