Skip to content

Commit 1c3e955

Browse files
CopilotmarcpopMSFT
andcommitted
Only set UnsupportedTargetFrameworkVersion when NETCoreAppMaximumVersion exists
Co-authored-by: marcpopMSFT <[email protected]>
1 parent 3998f32 commit 1c3e955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Copyright (c) .NET Foundation. All rights reserved.
3131
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v10.0" DisplayName=".NET 10.0" Alias="net10.0" />
3232
</ItemGroup>
3333

34-
<PropertyGroup>
34+
<PropertyGroup Condition="'$(NETCoreAppMaximumVersion)' != ''">
3535
<!-- This is for a better error experience when using an older VS (with an older SDK) to target a newer TFM. The value should be the min VS version for N+1 version-->
3636
<UnsupportedTargetFrameworkVersion>$([MSBuild]::Add($(NETCoreAppMaximumVersion), 1)).0</UnsupportedTargetFrameworkVersion>
3737
<MinimumVisualStudioVersionForUnsupportedTargetFrameworkVersion>17.16</MinimumVisualStudioVersionForUnsupportedTargetFrameworkVersion>

0 commit comments

Comments
 (0)