Remove Arcade net9.0 workarounds (#17987)
This commit is contained in:
parent
3ac63e7eec
commit
fae23c6571
6 changed files with 6 additions and 151 deletions
|
@ -8,8 +8,6 @@
|
|||
|
||||
<Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||
<PropertyGroup>
|
||||
<!-- TODO: Remove NetCurrent override: https://github.com/dotnet/source-build/issues/3743 -->
|
||||
<NetCurrent>net9.0</NetCurrent>
|
||||
<!-- Fake, for SDK. -->
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<!-- We have no projects targeting multiple frameworks, so don't include in output path. -->
|
||||
|
|
|
@ -259,7 +259,12 @@ if [ "$alternateTarget" == "true" ]; then
|
|||
export NUGET_PACKAGES=$NUGET_PACKAGES/smoke-tests
|
||||
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildTests_$LogDateStamp.binlog" -flp:"LogFile=$SCRIPT_ROOT/artifacts/logs/BuildTests_$LogDateStamp.log" -clp:v=m ${MSBUILD_ARGUMENTS[@]} "$@"
|
||||
else
|
||||
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/eng/tools/init-build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog" -flp:LogFile="$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log" -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@"
|
||||
# BuildXPlatTasks uses NetCurrent but that is not set since Arcade isn't used here.
|
||||
# Bootstrap NetCurrent by deriving it from the installed .NET CLI version.
|
||||
netCurrent="$($CLI_ROOT/dotnet --version | while IFS='.' read major minor _; do echo "net$major.$minor"; done)"
|
||||
|
||||
"$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/eng/tools/init-build.proj" -p:NetCurrent=$netCurrent -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog" -flp:LogFile="$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log" -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@"
|
||||
|
||||
# kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver
|
||||
"$CLI_ROOT/dotnet" build-server shutdown
|
||||
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Thalman <mthalman@microsoft.com>
|
||||
Date: Wed, 18 Oct 2023 12:50:21 -0500
|
||||
Subject: [PATCH] Explicitly set TFM to net9.0
|
||||
|
||||
Backport: https://github.com/dotnet/source-build/issues/3663
|
||||
---
|
||||
perf/dotnet-format.Performance.csproj | 2 +-
|
||||
src/dotnet-format.csproj | 2 +-
|
||||
tests/dotnet-format.UnitTests.csproj | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/perf/dotnet-format.Performance.csproj b/perf/dotnet-format.Performance.csproj
|
||||
index 677b7b9a..3e1387d1 100644
|
||||
--- a/perf/dotnet-format.Performance.csproj
|
||||
+++ b/perf/dotnet-format.Performance.csproj
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
- <TargetFramework>$(NetCurrent)</TargetFramework>
|
||||
+ <TargetFramework>net9.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<Optimize>true</Optimize>
|
||||
<Configuration>Release</Configuration>
|
||||
diff --git a/src/dotnet-format.csproj b/src/dotnet-format.csproj
|
||||
index 5549fb71..8a77d03f 100644
|
||||
--- a/src/dotnet-format.csproj
|
||||
+++ b/src/dotnet-format.csproj
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
- <TargetFramework>$(NetCurrent)</TargetFramework>
|
||||
+ <TargetFramework>net9.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.CodeAnalysis.Tools</RootNamespace>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
diff --git a/tests/dotnet-format.UnitTests.csproj b/tests/dotnet-format.UnitTests.csproj
|
||||
index c4311a1a..5b1bcfb9 100644
|
||||
--- a/tests/dotnet-format.UnitTests.csproj
|
||||
+++ b/tests/dotnet-format.UnitTests.csproj
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
- <TargetFramework>$(NetCurrent)</TargetFramework>
|
||||
+ <TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>Microsoft.CodeAnalysis.Tools.Tests</RootNamespace>
|
||||
|
||||
<!-- Copy nuget assemblies to build directory so that Microsoft.CodeAnalysis.Features.* can be located when running tests. -->
|
|
@ -1,23 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Thalman <mthalman@microsoft.com>
|
||||
Date: Wed, 18 Oct 2023 10:58:11 -0500
|
||||
Subject: [PATCH] Explicitly set net9.0 TFM
|
||||
|
||||
Backport: https://github.com/dotnet/source-build/issues/3663
|
||||
---
|
||||
Directory.Build.props | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Directory.Build.props b/Directory.Build.props
|
||||
index bf6754f23..d76f449be 100644
|
||||
--- a/Directory.Build.props
|
||||
+++ b/Directory.Build.props
|
||||
@@ -66,7 +66,7 @@
|
||||
-->
|
||||
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'">
|
||||
<PropertyGroup>
|
||||
- <DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
|
||||
+ <DefaultNetCoreTargetFramework>net9.0</DefaultNetCoreTargetFramework>
|
||||
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework)</DefaultNetCoreTargetFrameworks>
|
||||
</PropertyGroup>
|
||||
</When>
|
|
@ -1,23 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Thalman <mthalman@microsoft.com>
|
||||
Date: Tue, 7 Nov 2023 12:40:49 -0600
|
||||
Subject: [PATCH] Explicitly target net9.0 for NoOp proj
|
||||
|
||||
https://github.com/dotnet/source-build/issues/3663
|
||||
---
|
||||
eng/NoOp.csproj | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/eng/NoOp.csproj b/eng/NoOp.csproj
|
||||
index 659aa00a..3ecefd43 100644
|
||||
--- a/eng/NoOp.csproj
|
||||
+++ b/eng/NoOp.csproj
|
||||
@@ -5,7 +5,7 @@
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<PropertyGroup>
|
||||
- <TargetFramework>$(NetCurrent)</TargetFramework>
|
||||
+ <TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
|
@ -1,51 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Thalman <mthalman@microsoft.com>
|
||||
Date: Thu, 19 Oct 2023 08:29:45 -0500
|
||||
Subject: [PATCH] Explicitly use net9.0 TFM
|
||||
|
||||
Backport: https://github.com/dotnet/source-build/issues/3663
|
||||
---
|
||||
Directory.Build.targets | 2 +-
|
||||
.../Microsoft.TestPlatform.Build.csproj | 2 +-
|
||||
.../Microsoft.TestPlatform.CLI.csproj | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Directory.Build.targets b/Directory.Build.targets
|
||||
index b720568b..617ca4fc 100644
|
||||
--- a/Directory.Build.targets
|
||||
+++ b/Directory.Build.targets
|
||||
@@ -6,7 +6,7 @@
|
||||
<!-- Source build properties -->
|
||||
<PropertyGroup Condition=" '$(DotNetBuildFromSource)' == 'true' ">
|
||||
<!-- Force setting TargetFrameworks to net7.0 only if it was set -->
|
||||
- <TargetFrameworks Condition=" '$(TargetFrameworks)' != '' ">$(NetCurrent)</TargetFrameworks>
|
||||
+ <TargetFrameworks Condition=" '$(TargetFrameworks)' != '' ">net9.0</TargetFrameworks>
|
||||
<!-- Force setting TargetFramework to net7.0 only if it was set -->
|
||||
<TargetFramework Condition=" '$(TargetFramework)' != '' ">$(NetCurrent)</TargetFramework>
|
||||
</PropertyGroup>
|
||||
diff --git a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj
|
||||
index a93852ce..945b1ac2 100644
|
||||
--- a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj
|
||||
+++ b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj
|
||||
@@ -12,7 +12,7 @@
|
||||
<Choose>
|
||||
<When Condition=" '$(DotNetBuildFromSource)' == 'true' ">
|
||||
<PropertyGroup>
|
||||
- <Tfm>$(NetCurrent)</Tfm>
|
||||
+ <Tfm>net9.0</Tfm>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
diff --git a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj
|
||||
index b8f6849b..b56b993c 100644
|
||||
--- a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj
|
||||
+++ b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj
|
||||
@@ -31,7 +31,7 @@
|
||||
<ItemGroup Label="NuGet">
|
||||
<NuspecProperty Include="SrcPackageFolder=$(SrcPackageFolder)" />
|
||||
<NuspecProperty Include="TesthostRuntimeconfig=$(RepoRoot)temp\testhost" />
|
||||
- <NuspecProperty Include="SourceBuildTfm=$(NetCurrent)" />
|
||||
+ <NuspecProperty Include="SourceBuildTfm=net9.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
Loading…
Add table
Reference in a new issue