[main] Add patch that retargets arcade projects to net7.0 (#13874)

* Add patch that retargets arcade projects to net7.0

* add patches to bootstrap arcade net7.0 tfm version

* Replace net6.0 references with 7.0 in source build
This commit is contained in:
Logan Bussell 2022-05-26 13:20:44 -07:00 committed by GitHub
parent 0241501797
commit c571d5ea85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1208 additions and 3 deletions

View file

@ -61,7 +61,7 @@
<EnvironmentVariables Include="_InitializeDotNetCli=$(DotNetCliToolDir)" />
<EnvironmentVariables Include="_DotNetInstallDir=$(DotNetCliToolDir)" />
<EnvironmentVariables Include="_InitializeToolset=$(ProjectDir)Tools/source-built/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj" Condition="'$(UseBootstrapArcade)' != 'true'" />
<EnvironmentVariables Include="_OverrideArcadeInitializeBuildToolFramework=net6.0" />
<EnvironmentVariables Include="_OverrideArcadeInitializeBuildToolFramework=net7.0" />
<EnvironmentVariables Include="DotNetUseShippingVersions=true" />

View file

@ -127,11 +127,11 @@
See https://github.com/dotnet/source-build/issues/1914 for details. -->
<PropertyGroup>
<ArcadeSdkReplacementText>
logger_path=&quot;%24toolset_dir&quot;/%24%28cd &quot;$toolset_dir&quot; &amp;&amp; find . -name Microsoft.DotNet.Arcade.Sdk.dll \( -regex &apos;.*netcoreapp2.1.*&apos; -or -regex &apos;.*net6.0.*&apos; \) )
logger_path=&quot;%24toolset_dir&quot;/%24%28cd &quot;$toolset_dir&quot; &amp;&amp; find . -name Microsoft.DotNet.Arcade.Sdk.dll \( -regex &apos;.*netcoreapp2.1.*&apos; -or -regex &apos;.*net7.0.*&apos; \) )
</ArcadeSdkReplacementText>
<ArcadeLoggingReplacementText>
logger_path=&quot;%24toolset_dir&quot;/%24%28cd &quot;$toolset_dir&quot; &amp;&amp; find . -name Microsoft.DotNet.ArcadeLogging.dll \( -regex &apos;.*netcoreapp2.1.*&apos; -or -regex &apos;.*net6.0.*&apos; \) )
logger_path=&quot;%24toolset_dir&quot;/%24%28cd &quot;$toolset_dir&quot; &amp;&amp; find . -name Microsoft.DotNet.ArcadeLogging.dll \( -regex &apos;.*netcoreapp2.1.*&apos; -or -regex &apos;.*net7.0.*&apos; \) )
</ArcadeLoggingReplacementText>
<LoggerPathReplacementText>

View file

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <loganbussell@microsoft.com>
Date: Mon, 25 Apr 2022 15:07:55 -0700
Subject: [PATCH] look for arcade assemblies in net6.0 artifacts directory
---
eng/common/tools.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 17f0a365..f8852dbb 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -435,6 +435,8 @@ function MSBuild {
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" )
+ possiblePaths+=( "$toolset_dir/net6.0/Microsoft.DotNet.ArcadeLogging.dll" )
+ possiblePaths+=( "$toolset_dir/net6.0/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path

View file

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <loganbussell@microsoft.com>
Date: Mon, 25 Apr 2022 15:07:55 -0700
Subject: [PATCH] look for arcade assemblies in net6.0 artifacts directory
---
eng/common/tools.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 17f0a365..f8852dbb 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -435,6 +435,8 @@ function MSBuild {
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" )
+ possiblePaths+=( "$toolset_dir/net6.0/Microsoft.DotNet.ArcadeLogging.dll" )
+ possiblePaths+=( "$toolset_dir/net6.0/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path

View file

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Logan Bussell <loganbussell@microsoft.com>
Date: Mon, 25 Apr 2022 15:07:55 -0700
Subject: [PATCH] look for arcade assemblies in net6.0 artifacts directory
---
eng/common/tools.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 17f0a365..f8852dbb 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -435,6 +435,8 @@ function MSBuild {
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" )
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" )
+ possiblePaths+=( "$toolset_dir/net6.0/Microsoft.DotNet.ArcadeLogging.dll" )
+ possiblePaths+=( "$toolset_dir/net6.0/Microsoft.DotNet.Arcade.Sdk.dll" )
for path in "${possiblePaths[@]}"; do
if [[ -f $path ]]; then
selectedPath=$path