Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
c5aa4cb
Add runtime patch to fully qualify conflicting runtime and roslyn APIs
lbussell Jul 14, 2022
2654477
Add aspnetcore patch for lifetime scope
lbussell Jul 13, 2022
c2c41d8
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 18, 2022
3511f9b
Add prebuilt removal patches for fixes that haven't flowed
MichaelSimons Jul 18, 2022
e42bd5e
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 19, 2022
198f82f
Use repo name for git-info version number special cases
lbussell Jul 19, 2022
5c90657
Delete aspnetcore patches
lbussell Jul 18, 2022
012525e
Update Microsoft.Deployment.DotNet.Releases Versions.Details.xml depe…
MichaelSimons Jul 19, 2022
8e41876
Remove backported sdk patch
MichaelSimons Jul 19, 2022
f74165f
Add runtime patch to disable analyzers
MichaelSimons Jul 19, 2022
177ae03
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 20, 2022
a99f84e
Add patch to remove app host prebuilt
MichaelSimons Jul 20, 2022
b92fb46
Add source-build patch for jwt prebuilt
MichaelSimons Jul 20, 2022
3916401
Add patches for command-line-api and msbuild net7.0 TFM
lbussell Jul 20, 2022
be51252
Update aspnetcore patch
lbussell Jul 20, 2022
927daf1
Update source-build-externals
MichaelSimons Jul 20, 2022
6161ad0
Update aspnetcore patch
MichaelSimons Jul 20, 2022
e48c176
Merge branch '7.0-zero-prebuilts' of https://github.com/MichaelSimons…
MichaelSimons Jul 20, 2022
c20d853
Add source-build-externals patch
MichaelSimons Jul 20, 2022
9ce7366
Update SBRP version
MichaelSimons Jul 21, 2022
243149c
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 21, 2022
9cf3f5f
Revert tfm patches
MichaelSimons Jul 21, 2022
a720a1e
Revert "Revert tfm patches"
MichaelSimons Jul 21, 2022
5f297e2
Revert msbuild net70 tfm patch
MichaelSimons Jul 21, 2022
8b81bc8
Add FSharp prebuilt patch
MichaelSimons Jul 21, 2022
912c424
misc updates
MichaelSimons Jul 21, 2022
fd6176f
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 22, 2022
0621b09
Add linker patch
MichaelSimons Jul 22, 2022
5983a57
Add linker patch
MichaelSimons Jul 22, 2022
9f002f6
Add patch for retargeting fsharp
lbussell Jul 22, 2022
6e47d88
Add patch for retargeting sdk
lbussell Jul 22, 2022
0724e8f
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 26, 2022
91e62a0
Resolve patch conflict from latest merge
MichaelSimons Jul 26, 2022
d2c4918
Merge branch '7.0-zero-prebuilts' of https://github.com/MichaelSimons…
MichaelSimons Jul 26, 2022
9ca3256
Remove failing patches
MichaelSimons Jul 26, 2022
6c9c62d
Remove unnecessary patch
MichaelSimons Jul 26, 2022
f6bae4b
Re-add msbuild patch for net7.0 TFM
lbussell Jul 26, 2022
604b3a8
Revert "Remove failing patches"
lbussell Jul 26, 2022
1ef4bf5
Fix fsharp patch
lbussell Jul 26, 2022
db8f402
Fix msbuild patch typo
lbussell Jul 26, 2022
b0845e7
Update fsharp patch
lbussell Jul 26, 2022
721c332
Clean up SDK patch
lbussell Jul 27, 2022
b8f1153
Merge branch 'main' of https://github.com/dotnet/installer into 7.0-z…
MichaelSimons Jul 28, 2022
bfb9b20
Resolve patch conflicts from last merge
MichaelSimons Jul 28, 2022
eaf5ae2
Fix discrepancy between versions of DotNetDeltaApplier TFM version
lbussell Jul 28, 2022
8e518fd
Merge remote-tracking branch 'upstream/main' into 7.0-zero-prebuilts
lbussell Aug 2, 2022
86a0f48
Update SDK patch
lbussell Aug 2, 2022
8df754a
Fix fsharp patch
lbussell Aug 2, 2022
0945d00
Fix msbuild build error
lbussell Aug 3, 2022
f4759b9
Update nuget-client to net7.0
lbussell Aug 3, 2022
23efb72
Update order of projects in known-good
lbussell Aug 3, 2022
065a100
Fix fsharp xml doc path for net7.0
lbussell Aug 3, 2022
ba4f5f6
Add missing change in msbuild patch
lbussell Aug 3, 2022
a510dcc
Merge remote-tracking branch 'upstream/main' into 7.0-zero-prebuilts
lbussell Aug 4, 2022
46acdda
Fix SDK patch
lbussell Aug 4, 2022
5654836
Add runtime patch for targeting net7.0
lbussell Aug 4, 2022
64f508b
Fix runtime-portable build
lbussell Aug 5, 2022
901c86c
Add patch for roslyn-analyzers net7.0 TFM
lbussell Aug 8, 2022
786b296
Merge remote-tracking branch 'upstream/main' into 7.0-zero-prebuilts
lbussell Aug 8, 2022
077c96f
Fix runtime patches
lbussell Aug 8, 2022
10657ee
Add patch for targeting net7.0 in roslyn
lbussell Aug 9, 2022
f00cff2
Merge remote-tracking branch 'upstream/main' into 7.0-zero-prebuilts
lbussell Aug 9, 2022
f5ca640
Fix Microsoft.CSharp.Core.targets location
lbussell Aug 10, 2022
78c8fd1
Merge remote-tracking branch 'upstream/release/7.0.1xx' into 7.0-zero…
lbussell Aug 22, 2022
5b24485
Update patches
lbussell Aug 22, 2022
e4a5da4
Update roslyn patch
lbussell Aug 23, 2022
9e57c88
Update prebuilts version
lbussell Aug 23, 2022
fee3e87
Update roslyn patch again
lbussell Aug 23, 2022
9049c9f
Add vstest patch for targeting net7.0
lbussell Aug 23, 2022
efda346
Change minimum supported TFM in runtime
lbussell Aug 23, 2022
e3236ac
Revert "Add vstest patch for targeting net7.0"
lbussell Aug 23, 2022
82c3428
Add patch to update compatibility suppressions in runtime
lbussell Aug 24, 2022
dbe6913
Use dev/haplois/net67 branch of vstest for validation. PR: https://gi…
lbussell Aug 24, 2022
4018e1c
Get rid of 2.0.X prebuilts from xliff
lbussell Aug 24, 2022
106bec4
Disable targeting windows in roslyn for source-build
lbussell Aug 25, 2022
971b435
Merge remote-tracking branch 'upstream/release/7.0.1xx' into 7.0-zero…
lbussell Aug 25, 2022
8036901
Delete backported runtime patches
lbussell Aug 25, 2022
006d93e
Fix xliff patch
lbussell Aug 25, 2022
2254eca
Merge remote-tracking branch 'upstream/release/7.0.1xx' into 7.0-zero…
lbussell Aug 31, 2022
3159a2f
Remove backported roslyn patch
lbussell Aug 31, 2022
98e26f7
Merge remote-tracking branch 'upstream/release/7.0.1xx' into 7.0-zero…
lbussell Sep 7, 2022
f51b250
Remove backported fsharp patch
lbussell Sep 7, 2022
494c5fd
Update SDK patch
lbussell Sep 9, 2022
1feeeca
Merge branch 'release/7.0.1xx' of https://github.com/dotnet/installer…
MichaelSimons Sep 12, 2022
83c5a6b
Remove backported source build patches
MichaelSimons Sep 12, 2022
dd63a1e
Update patches
lbussell Sep 12, 2022
72f2415
Remove roslyn patch for net7.0 TFM
lbussell Sep 12, 2022
0d23606
Update SDK patch roslyn bits location
lbussell Sep 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/SourceBuild/tarball/content/repos/known-good.proj
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
<RepositoryReference Include="diagnostics" />
<RepositoryReference Include="llvm-project" />
<RepositoryReference Include="razor-compiler" />
<RepositoryReference Include="xliff-tasks" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making a separate PR to check in these changes since ideally this PR would be abandoned because all the patches would get backported.

<RepositoryReference Include="roslyn" />
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="symreader" />
<RepositoryReference Include="xdt" />
<RepositoryReference Include="xliff-tasks" />

<!-- Tier 2 -->
<RepositoryReference Include="linker" />
<RepositoryReference Include="msbuild" />
<RepositoryReference Include="runtime-portable" />
<RepositoryReference Include="runtime" />
<RepositoryReference Include="msbuild" />

<!-- Tier 3 -->
<RepositoryReference Include="roslyn-analyzers" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <[email protected]>
Date: Tue, 19 Jul 2022 14:47:28 -0700
Subject: [PATCH] Update projects to net7.0 TFM with shared property, Only enable trimming for .NET Core

Backport PR: https://github.com/dotnet/command-line-api/pull/1803
---
Directory.Build.props | 1 +
global.json | 7 ++++---
.../System.CommandLine.ApiCompatibility.Tests.csproj | 2 +-
.../System.CommandLine.Benchmarks.csproj | 4 ++--
.../System.CommandLine.DragonFruit.Tests.csproj | 2 +-
.../System.CommandLine.Generator.Tests.csproj | 2 +-
.../System.CommandLine.Hosting.Tests.csproj | 2 +-
.../System.CommandLine.NamingConventionBinder.Tests.csproj | 2 +-
.../System.CommandLine.Rendering.Tests.csproj | 2 +-
.../EndToEndTestApp/EndToEndTestApp.csproj | 2 +-
.../dotnet-suggest.Tests.csproj | 2 +-
src/System.CommandLine.Suggest/dotnet-suggest.csproj | 2 +-
.../System.CommandLine.Tests.csproj | 2 +-
.../TestApps/NativeAOT/NativeAOT.csproj | 4 ++--
.../TestApps/Trimming/Trimming.csproj | 4 ++--
src/System.CommandLine/System.CommandLine.csproj | 7 +++++--
16 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/Directory.Build.props b/Directory.Build.props
index c0c5f79a..901c57c7 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,6 +9,7 @@
<NoWarn Condition=" '$(DotnetBuildFromSource)' == 'true' ">$(NoWarn);CS8714;CS8765;CS8600;CS8601;CS8602;CS8603;CS8604</NoWarn>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>10.0</LangVersion>
+ <TargetFrameworkForNETSDK>net7.0</TargetFrameworkForNETSDK>
</PropertyGroup>

<PropertyGroup>
diff --git a/global.json b/global.json
index 1c6fd268..f5bec611 100644
--- a/global.json
+++ b/global.json
@@ -1,12 +1,13 @@
{
"tools": {
- "dotnet": "6.0.100",
+ "dotnet": "7.0.100-preview.6.22352.1",
"runtimes": {
"dotnet": [
- "5.0.10"
+ "5.0.17",
+ "6.0.7"
]
},
- "xcopy-msbuild": "16.10.0-preview2"
+ "xcopy-msbuild": "17.1.0"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22168.2"
diff --git a/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj b/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj
index 30bcd139..4cc48fde 100644
--- a/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj
+++ b/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

diff --git a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
index e54aabc4..185ba62a 100644
--- a/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
+++ b/src/System.CommandLine.Benchmarks/System.CommandLine.Benchmarks.csproj
@@ -9,8 +9,8 @@
<UseSharedCompilation>false</UseSharedCompilation>

<!-- Supported target frameworks -->
- <TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net461;net5.0;net6.0;</TargetFrameworks>
- <TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net5.0;net6.0;</TargetFrameworks>
+ <TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net461;net5.0;net6.0;net7.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net5.0;net6.0;net7.0</TargetFrameworks>

<!-- This repo does not produce any libraries, therefore generating docs is disabled -->
<GenerateDocumentationFile>False</GenerateDocumentationFile>
diff --git a/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj b/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj
index 7eee0b38..e504f7e8 100644
--- a/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj
+++ b/src/System.CommandLine.DragonFruit.Tests/System.CommandLine.DragonFruit.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<StartupObject>AutoGeneratedProgram</StartupObject>
<!-- Ensure that an XML doc file is emitted to supply command line help -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
diff --git a/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj b/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj
index a423eb1e..20f0f410 100644
--- a/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj
+++ b/src/System.CommandLine.Generator.Tests/System.CommandLine.Generator.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net6.0</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
diff --git a/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj b/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj
index 328b4e12..8e2cd6ea 100644
--- a/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj
+++ b/src/System.CommandLine.Hosting.Tests/System.CommandLine.Hosting.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
- <TargetFrameworks>net6.0</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
diff --git a/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj b/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj
index 43eb7c29..7bff1796 100644
--- a/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj
+++ b/src/System.CommandLine.NamingConventionBinder.Tests/System.CommandLine.NamingConventionBinder.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net6.0</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<LangVersion>10</LangVersion>
</PropertyGroup>
diff --git a/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj b/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj
index 1c116508..afd6dc6a 100644
--- a/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj
+++ b/src/System.CommandLine.Rendering.Tests/System.CommandLine.Rendering.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

diff --git a/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj b/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj
index 9a3eb54d..76add0d5 100644
--- a/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj
+++ b/src/System.CommandLine.Suggest.Tests/EndToEndTestApp/EndToEndTestApp.csproj
@@ -6,7 +6,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
</PropertyGroup>

</Project>
diff --git a/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj b/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj
index da6abedf..f1711a10 100644
--- a/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj
+++ b/src/System.CommandLine.Suggest.Tests/dotnet-suggest.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
</PropertyGroup>

<ItemGroup>
diff --git a/src/System.CommandLine.Suggest/dotnet-suggest.csproj b/src/System.CommandLine.Suggest/dotnet-suggest.csproj
index fd825008..ce4bda1d 100644
--- a/src/System.CommandLine.Suggest/dotnet-suggest.csproj
+++ b/src/System.CommandLine.Suggest/dotnet-suggest.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<PackageId>dotnet-suggest</PackageId>
diff --git a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
index c1988ec4..44b5c9fc 100644
--- a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
+++ b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net6.0</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworkForNETSDK)</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
diff --git a/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj b/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj
index b0036ed0..cc306fea 100644
--- a/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj
+++ b/src/System.CommandLine.Tests/TestApps/NativeAOT/NativeAOT.csproj
@@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<!-- producing more detailed log output -->
<TrimmerSingleWarn>false</TrimmerSingleWarn>
</PropertyGroup>

<PropertyGroup>
- <SystemCommandLineDllPath Condition="'$(SystemCommandLineDllPath)'==''">..\..\..\System.CommandLine\bin\Release\net6.0\System.CommandLine.dll</SystemCommandLineDllPath>
+ <SystemCommandLineDllPath Condition="'$(SystemCommandLineDllPath)'==''">..\..\..\System.CommandLine\bin\Release\$(TargetFrameworkForNETSDK)\System.CommandLine.dll</SystemCommandLineDllPath>
</PropertyGroup>

<ItemGroup>
diff --git a/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj b/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj
index 6dcf8892..615b0764 100644
--- a/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj
+++ b/src/System.CommandLine.Tests/TestApps/Trimming/Trimming.csproj
@@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>$(TargetFrameworkForNETSDK)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishTrimmed>true</PublishTrimmed>
@@ -10,7 +10,7 @@
</PropertyGroup>

<PropertyGroup>
- <SystemCommandLineDllPath Condition="'$(SystemCommandLineDllPath)'==''">..\..\..\System.CommandLine\bin\Release\net6.0\System.CommandLine.dll</SystemCommandLineDllPath>
+ <SystemCommandLineDllPath Condition="'$(SystemCommandLineDllPath)'==''">..\..\..\System.CommandLine\bin\Release\$(TargetFrameworkForNETSDK)\System.CommandLine.dll</SystemCommandLineDllPath>
</PropertyGroup>

<ItemGroup>
diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj
index 424053a6..37115d70 100644
--- a/src/System.CommandLine/System.CommandLine.csproj
+++ b/src/System.CommandLine/System.CommandLine.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>System.CommandLine</PackageId>
- <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
+ <TargetFrameworks>$(TargetFrameworkForNETSDK);netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>10</LangVersion>
@@ -15,9 +15,12 @@
* Test and debug support
</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
+ <EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkForNETSDK)'">
<IsTrimmable>true</IsTrimmable>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
- <EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
Loading