未验证 提交 9a604cbc 编写于 作者: T ThomasGoulet73 提交者: GitHub

Use builtin MSBuild functions to compare versions (#5910)

上级 82cf279b
......@@ -2,8 +2,8 @@
<PropertyGroup>
<RuntimeFrameworkVersion Condition="'$(MicrosoftNETCoreAppRuntimewinx64Version)'!='' And
'$(NoTargets)'!='true' And
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And
('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')">$(MicrosoftNETCoreAppRuntimewinx64Version)</RuntimeFrameworkVersion>
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And
$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))">$(MicrosoftNETCoreAppRuntimewinx64Version)</RuntimeFrameworkVersion>
</PropertyGroup>
<!-- workaround for package downgrade in Microsoft.NetCore.Platforms -->
......
......@@ -16,7 +16,7 @@
Condition="'$(MicrosoftNETCoreAppRefVersion)'!=''
And '$(NoTargets)'!='true'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')
And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
And '$(MSBuildProjectExtension)'!='.vcxproj'">
<TargetingPackVersion>$(MicrosoftNETCoreAppRefVersion)</TargetingPackVersion>
</FrameworkReference>
......@@ -30,6 +30,6 @@
<PropertyGroup>
<!-- If TargetFramework is not one of the supported .NET Core versions, then reset RuntimeFrameworkVersion -->
<RuntimeFrameworkVersion Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp') Or ('$(TargetFrameworkVersion)' != 'v3.0' And '$(TargetFrameworkVersion)' != 'v3.1' And '$(TargetFrameworkVersion)' == 'v6.0')" />
<RuntimeFrameworkVersion Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp') Or $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))" />
</PropertyGroup>
</Project>
......@@ -6,7 +6,7 @@
GeneratePathProperty="True"
Condition="'$(MSBuildProjectExtension)'!='.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')
And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
And '$(NoAutoMicrosoftPrivateWinformsReference)'!='true'"/>
<!--
......@@ -122,7 +122,7 @@
Condition="'@(MicrosoftDotNetWpfGitHubReference)'!=''
And '$(MSBuildProjectExtension)' != '.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')
And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
and '$(DoNotLimitMicrosoftDotNetWpfGitHubReferences)'!='true'">
<!--
In your project, Add a references to WPF GitHub transport package like this:
......@@ -196,7 +196,7 @@
<Target Name="ResolveWinFormsReferences"
Condition="'@(MicrosoftPrivateWinFormsReference)'!=''
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0') ">
And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0')) ">
<ItemGroup>
<Reference Include="$(PkgMicrosoft_Private_Winforms)\ref\$(TargetFramework)\%(MicrosoftPrivateWinFormsReference.Identity).dll"
Condition="Exists('$(PkgMicrosoft_Private_Winforms)\ref\$(TargetFramework)\%(MicrosoftPrivateWinFormsReference.Identity).dll')">
......
......@@ -6,7 +6,7 @@
GeneratePathProperty="True"
Condition="'$(MSBuildProjectExtension)'!='.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')
And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
And '$(NoAutoMicrosoftDotNetWpfGitHubPackageReference)'!='true'
And '$(MicrosoftDotNetWpfGitHubPackage)'!=''"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册