
* Add runtime patch to fully qualify conflicting runtime and roslyn APIs * Add aspnetcore patch for lifetime scope * Add prebuilt removal patches for fixes that haven't flowed * Use repo name for git-info version number special cases * Delete aspnetcore patches * Update Microsoft.Deployment.DotNet.Releases Versions.Details.xml dependency * Remove backported sdk patch * Add runtime patch to disable analyzers * Add patch to remove app host prebuilt * Add source-build patch for jwt prebuilt * Add patches for command-line-api and msbuild net7.0 TFM * Update aspnetcore patch * Update source-build-externals * Update aspnetcore patch * Add source-build-externals patch * Update SBRP version * Revert tfm patches * Revert "Revert tfm patches" This reverts commit 9cf3f5f6230c0f88e0a9955dbeb545495bc3e855. * Revert msbuild net70 tfm patch * misc updates * Add linker patch * Add linker patch * Add patch for retargeting fsharp * Add patch for retargeting sdk * Resolve patch conflict from latest merge * Remove failing patches * Remove unnecessary patch * Re-add msbuild patch for net7.0 TFM * Revert "Remove failing patches" This reverts commit 9ca3256e9b670d2fc23aeebb785fa8b5c5cca6a4. * Fix fsharp patch * Fix msbuild patch typo * Update fsharp patch * Clean up SDK patch * Resolve patch conflicts from last merge * Fix discrepancy between versions of DotNetDeltaApplier TFM version * Update SDK patch * Fix fsharp patch * Fix msbuild build error * Update nuget-client to net7.0 * Update order of projects in known-good * Fix fsharp xml doc path for net7.0 * Add missing change in msbuild patch * Fix SDK patch * Add runtime patch for targeting net7.0 * Fix runtime-portable build * Add patch for roslyn-analyzers net7.0 TFM * Fix runtime patches * Add patch for targeting net7.0 in roslyn * Fix Microsoft.CSharp.Core.targets location * Update patches * Update roslyn patch * Update prebuilts version * Update roslyn patch again * Add vstest patch for targeting net7.0 * Change minimum supported TFM in runtime * Revert "Add vstest patch for targeting net7.0" This reverts commit 9049c9f585e52194312118ad8e5d15c0d19296b2. * Add patch to update compatibility suppressions in runtime * Use dev/haplois/net67 branch of vstest for validation. PR: https://github.com/microsoft/vstest/pull/3944 * Get rid of 2.0.X prebuilts from xliff * Disable targeting windows in roslyn for source-build * Delete backported runtime patches * Fix xliff patch * Remove backported roslyn patch * Remove backported fsharp patch * Update SDK patch * Remove backported source build patches * Update patches * Remove roslyn patch for net7.0 TFM * Update SDK patch roslyn bits location Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
268 lines
13 KiB
Diff
268 lines
13 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
From: Logan Bussell <loganbussell@microsoft.com>
|
||
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' ">
|