Skip to content

Commit 87704ce

Browse files
authored
Use net8.0 TFM when building with source-build (#2150)
* Use net8.0 TFM when building with source-build * Revert changes to sample projects
1 parent d0af5a7 commit 87704ce

File tree

17 files changed

+22
-22
lines changed

17 files changed

+22
-22
lines changed

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
<LangVersion>10.0</LangVersion>
1212
</PropertyGroup>
1313

14-
<PropertyGroup Condition="'$(DisableArcade)' == '1'">
15-
<TargetFrameworkForNETSDK>net7.0</TargetFrameworkForNETSDK>
14+
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
15+
<TargetFrameworkForNETSDK>$(NetCurrent)</TargetFrameworkForNETSDK>
1616
</PropertyGroup>
1717

18-
<PropertyGroup Condition="'$(DisableArcade)' != '1'">
18+
<PropertyGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
1919
<TargetFrameworkForNETSDK>net7.0</TargetFrameworkForNETSDK>
2020
</PropertyGroup>
2121

src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<UseSharedCompilation>false</UseSharedCompilation>
1010

1111
<!-- Supported target frameworks -->
12-
<TargetFramework>net7.0</TargetFramework>
12+
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
1313

1414
<!-- This repo does not produce any libraries, therefore generating docs is disabled -->
1515
<GenerateDocumentationFile>False</GenerateDocumentationFile>

src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net7.0</TargetFramework>
3+
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
44
<StartupObject>AutoGeneratedProgram</StartupObject>
55
<!-- Ensure that an XML doc file is emitted to supply command line help -->
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>

src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0</TargetFrameworks>
3+
<TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
44
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
55
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
66
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>

src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0</TargetFrameworks>
4+
<TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
55
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<IsPackable>true</IsPackable>
5-
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0;netstandard2.1;$(TargetFrameworkForNETSDK)</TargetFrameworks>
66
<Description>This package provides support for using System.CommandLine with Microsoft.Extensions.Hosting.</Description>
77
</PropertyGroup>
88

src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0</TargetFrameworks>
3+
<TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
44
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
55
<LangVersion>10</LangVersion>
66
</PropertyGroup>

src/System.CommandLine.NamingConventionBinder/System.CommandLine.NamingConventionBinder.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<IsPackable>true</IsPackable>
55
<PackageId>System.CommandLine.NamingConventionBinder</PackageId>
6-
<TargetFrameworks>net7.0;netstandard2.0</TargetFrameworks>
6+
<TargetFrameworks>$(TargetFrameworkForNETSDK);netstandard2.0</TargetFrameworks>
77
<LangVersion>10</LangVersion>
88
<Nullable>enable</Nullable>
99
<Description>This package provides command handler support for System.CommandLine performs parameter and model binding by matching option and argument names to parameter and property names.</Description>

src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)