diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index 2efe17577c26..9d05322e929f 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -8,8 +8,6 @@ - - net9.0 netstandard2.0 diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh index a1224e4369b9..c56c5085d27a 100755 --- a/src/SourceBuild/content/build.sh +++ b/src/SourceBuild/content/build.sh @@ -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 diff --git a/src/SourceBuild/patches/format/0001-Explicitly-set-TFM-to-net9.0.patch b/src/SourceBuild/patches/format/0001-Explicitly-set-TFM-to-net9.0.patch deleted file mode 100644 index ac34d93389d8..000000000000 --- a/src/SourceBuild/patches/format/0001-Explicitly-set-TFM-to-net9.0.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Matt Thalman -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 @@ -  - - -- $(NetCurrent) -+ net9.0 - Exe - true - Release -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 @@ -  - - -- $(NetCurrent) -+ net9.0 - Exe - Microsoft.CodeAnalysis.Tools - true -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 @@ -  - - -- $(NetCurrent) -+ net9.0 - Microsoft.CodeAnalysis.Tools.Tests - - diff --git a/src/SourceBuild/patches/razor/0001-Explicitly-set-net9.0-TFM.patch b/src/SourceBuild/patches/razor/0001-Explicitly-set-net9.0-TFM.patch deleted file mode 100644 index 295561075966..000000000000 --- a/src/SourceBuild/patches/razor/0001-Explicitly-set-net9.0-TFM.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Matt Thalman -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 @@ - --> - - -- $(NetCurrent) -+ net9.0 - $(DefaultNetCoreTargetFramework) - - diff --git a/src/SourceBuild/patches/source-build-reference-packages/0001-Explicitly-target-net9.0-for-NoOp-proj.patch b/src/SourceBuild/patches/source-build-reference-packages/0001-Explicitly-target-net9.0-for-NoOp-proj.patch deleted file mode 100644 index 6438c7678c62..000000000000 --- a/src/SourceBuild/patches/source-build-reference-packages/0001-Explicitly-target-net9.0-for-NoOp-proj.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Matt Thalman -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 @@ - - - -- $(NetCurrent) -+ net9.0 - - - diff --git a/src/SourceBuild/patches/vstest/0001-Explicitly-use-net9.0-TFM.patch b/src/SourceBuild/patches/vstest/0001-Explicitly-use-net9.0-TFM.patch deleted file mode 100644 index 78ebca72a4e7..000000000000 --- a/src/SourceBuild/patches/vstest/0001-Explicitly-use-net9.0-TFM.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Matt Thalman -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 @@ - - - -- $(NetCurrent) -+ net9.0 - - $(NetCurrent) - -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 @@ - - - -- $(NetCurrent) -+ net9.0 - - - -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 @@ - - - -- -+ - - -