Skip to content

Commit 21b2e53

Browse files
committed
add support for .NET 9.0/10.0
1 parent 7ea04c7 commit 21b2e53

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

src/Smdn.MSBuild.DefineConstants.NETSdkApi/APIList.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT
66
<Target Name="GenerateAPIList" AfterTargets="Compile">
77
<ItemGroup>
88
<!-- .NET -->
9-
<_APIListTargetFramework Include="net8.0;net7.0;net6.0;net5.0" />
9+
<_APIListTargetFramework Include="net10.0;net9.0;net8.0;net7.0;net6.0;net5.0" />
1010
<!-- .NET Core -->
1111
<_APIListTargetFramework Include="netcoreapp3.1;netcoreapp3.0;netcoreapp2.1;netcoreapp2.0;netcoreapp1.1;netcoreapp1.0" />
1212
<!-- .NET Standard -->

src/Smdn.MSBuild.DefineConstants.NETSdkApi/ReadmeFile.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ SPDX-License-Identifier: MIT
5151
<!-- ref: list of preprocessor symbols for .NET target frameworks: https://docs.microsoft.com/ja-jp/dotnet/standard/frameworks -->
5252
<ItemGroup>
5353
<_CompatibleFrameworkVersionConstant Include="NET" />
54+
<_CompatibleFrameworkVersionConstant Include="NET10_0_OR_GREATER" />
55+
<_CompatibleFrameworkVersionConstant Include="NET9_0_OR_GREATER" />
5456
<_CompatibleFrameworkVersionConstant Include="NET8_0_OR_GREATER" />
5557
<_CompatibleFrameworkVersionConstant Include="NET7_0_OR_GREATER" />
5658
<_CompatibleFrameworkVersionConstant Include="NET6_0_OR_GREATER" />

src/Smdn.MSBuild.DefineConstants.NETSdkApi/build/Smdn.MSBuild.DefineConstants.NETSdkApi.targets

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,20 @@ SPDX-License-Identifier: MIT
10421042
<_NETSdkAvailableApi TargetFrameworkCondition="$(_TargetFrameworkCondition)" Namespace="System.Threading.Tasks" Include="Task.WhenEach"/>
10431043
</ItemGroup>
10441044

1045+
<!--
1046+
Applies to: NET10_0_OR_GREATER
1047+
-->
1048+
<PropertyGroup>
1049+
<_TargetFrameworkCondition>NET10_0_OR_GREATER</_TargetFrameworkCondition>
1050+
</PropertyGroup>
1051+
1052+
<MSBuild Properties="Set=$(DefineConstants);OtherSet=$(_TargetFrameworkCondition)" Projects="$(MSBuildThisFileFullPath)" Targets="TestSetOverlapsWith" >
1053+
<Output TaskParameter="TargetOutputs" PropertyName="_IsTargetFrameworkConditionMatched" />
1054+
</MSBuild>
1055+
1056+
<ItemGroup Condition="'$(_IsTargetFrameworkConditionMatched)' == 'true'">
1057+
</ItemGroup>
1058+
10451059
<!--
10461060
generate symbols
10471061
-->
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// SPDX-FileCopyrightText: 2025 smdn <smdn@smdn.jp>
2+
// SPDX-License-Identifier: MIT
3+
#if NET10_0_OR_GREATER
4+
#endif

0 commit comments

Comments
 (0)