Skip to content

Commit 08cb6a2

Browse files
committed
Extract .NET version into NetVer/NetTfm/NetOldTfm constants in common_versions.props
1 parent d9c6c7c commit 08cb6a2

10 files changed

Lines changed: 20 additions & 13 deletions

Configuration/Configuration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ItemGroup>
1010
<PackageReference Include="Ecng.Configuration" Version="$(EcngVer)" />
1111
</ItemGroup>
12-
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
12+
<ItemGroup Condition="'$(TargetFramework)' == '$(NetTfm)'">
1313
<PackageReference Include="NuGet.Configuration" Version="$(NuGetApiVer)" />
1414
</ItemGroup>
1515
</Project>

common_target_avalonia.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="common_target_common.props" />
33
<PropertyGroup>
4-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">net10.0</StockSharpTargets>
4+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">$(NetTfm)</StockSharpTargets>
55
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
66
</PropertyGroup>
77
</Project>

common_target_maui.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<PropertyGroup>
44
<UseMaui>true</UseMaui>
55
<SingleProject>true</SingleProject>
6-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">net10.0-android;net10.0-ios</StockSharpTargets>
7-
<StockSharpTargets Condition="'$(StockSharpTargets)' == 'net10.0-android;net10.0-ios' and $([MSBuild]::IsOSPlatform('windows'))">$(StockSharpTargets);net10.0-windows10.0.19041.0</StockSharpTargets>
6+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">$(NetTfm)-android;$(NetTfm)-ios</StockSharpTargets>
7+
<StockSharpTargets Condition="'$(StockSharpTargets)' == '$(NetTfm)-android;$(NetTfm)-ios' and $([MSBuild]::IsOSPlatform('windows'))">$(StockSharpTargets);$(NetTfm)-windows10.0.19041.0</StockSharpTargets>
88
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
99

1010
<SupportedOSPlatformVersion Condition="'$(SupportedOSPlatformVersion)' == '' and $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>

common_target_net.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="common_target_common.props" />
33
<PropertyGroup>
4-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">net6.0;net10.0</StockSharpTargets>
4+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">$(NetOldTfm);$(NetTfm)</StockSharpTargets>
55
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
66

77
<GenerateDocumentationFile>true</GenerateDocumentationFile>

common_target_net_new.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="common_target_common.props" />
33
<PropertyGroup>
4-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">net10.0</StockSharpTargets>
4+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">$(NetTfm)</StockSharpTargets>
55
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
66
</PropertyGroup>
77
</Project>

common_target_netwindows.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="common_target_common.props" />
33
<PropertyGroup>
4-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">net6.0-windows;net10.0-windows</StockSharpTargets>
4+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">$(NetOldTfm)-windows;$(NetTfm)-windows</StockSharpTargets>
55
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
66
</PropertyGroup>
77
</Project>

common_target_netwindows_new.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="common_target_common.props" />
33
<PropertyGroup>
4-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">net10.0-windows</StockSharpTargets>
4+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">$(NetTfm)-windows</StockSharpTargets>
55
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
66
</PropertyGroup>
77
</Project>

common_target_standard_net.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="common_target_common.props" />
33
<PropertyGroup>
4-
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">netstandard2.0;net6.0;net10.0</StockSharpTargets>
4+
<StockSharpTargets Condition="'$(StockSharpTargets)' == ''">netstandard2.0;$(NetOldTfm);$(NetTfm)</StockSharpTargets>
55
<TargetFrameworks>$(StockSharpTargets)</TargetFrameworks>
66

77
<GenerateDocumentationFile>true</GenerateDocumentationFile>

common_target_tests.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="common_target_net.props" />
33
<PropertyGroup>
44
<GenerateDocumentationFile>false</GenerateDocumentationFile>
5-
<TargetFrameworks>net6.0;net10.0</TargetFrameworks>
5+
<TargetFrameworks>$(NetOldTfm);$(NetTfm)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

common_versions.props

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('net6'))">
2+
<PropertyGroup>
3+
<NetVer>10</NetVer>
4+
<NetTfm>net$(NetVer).0</NetTfm>
5+
<NetOldVer>6</NetOldVer>
6+
<NetOldTfm>net$(NetOldVer).0</NetOldTfm>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('$(NetOldTfm)'))">
310
<LangVersion>13.0</LangVersion>
411
<MsExtensionsVer>8.*</MsExtensionsVer>
512
<MsCodeAnalysisVer>4.12.0</MsCodeAnalysisVer>
@@ -9,9 +16,9 @@
916
<GrpcVer>2.71.0</GrpcVer>
1017
</PropertyGroup>
1118

12-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net10'))">
19+
<PropertyGroup Condition="$(TargetFramework.StartsWith('$(NetTfm)'))">
1320
<LangVersion>latest</LangVersion>
14-
<MsExtensionsVer>10.*</MsExtensionsVer>
21+
<MsExtensionsVer>$(NetVer).*</MsExtensionsVer>
1522
<MsCodeAnalysisVer>4.*</MsCodeAnalysisVer>
1623
<MsCodeAnalysisAnalyzersVer>3.*</MsCodeAnalysisAnalyzersVer>
1724
<MsTestVer>4.*</MsTestVer>

0 commit comments

Comments
 (0)