Skip to content

Commit d8d8cb0

Browse files
committed
Fix parsing normalized SDK version
1 parent 58c260c commit d8d8cb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ Copyright (c) .NET Foundation. All rights reserved.
7575
<_TargetPlatformVersionUsesCsWinRT3>false</_TargetPlatformVersionUsesCsWinRT3>
7676
<_TargetPlatformVersionUsesCsWinRT3 Condition="'$(TargetPlatformIdentifier)' == 'Windows' and $([System.Version]::Parse('$(TargetPlatformVersion)').Revision) == 1">true</_TargetPlatformVersionUsesCsWinRT3>
7777
<_OriginalWindowsTargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows'">$(TargetPlatformVersion)</_OriginalWindowsTargetPlatformVersion>
78-
<TargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows' and '$(_TargetPlatformVersionUsesCsWinRT3)' == 'true'" >$([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 3)).0</TargetPlatformVersion>
78+
<_NormalizedWindowsTargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows'">$([System.Version]::Parse('$(TargetPlatformVersion)').Major).$([System.Version]::Parse('$(TargetPlatformVersion)').Minor).$([System.Version]::Parse('$(TargetPlatformVersion)').Build).0</_NormalizedWindowsTargetPlatformVersion>
79+
<TargetPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'Windows' and '$(_TargetPlatformVersionUsesCsWinRT3)' == 'true'" >$(_NormalizedWindowsTargetPlatformVersion)</TargetPlatformVersion>
7980

8081
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == '' or ('$(TargetPlatformIdentifier)' == 'Windows' and !$([MSBuild]::VersionGreaterThanOrEquals($(TargetPlatformVersion), 10.0)))" >$([MSBuild]::GetTargetPlatformVersion('$(TargetFramework)', 2))</TargetPlatformVersion>
8182
<TargetPlatformVersion Condition="$([MSBuild]::VersionEquals($(TargetPlatformVersion), 0.0))" ></TargetPlatformVersion>

0 commit comments

Comments
 (0)