diff --git a/build/RunTestsOnHelix.cmd b/build/RunTestsOnHelix.cmd
index 8d822621b206..49cd4081a934 100644
--- a/build/RunTestsOnHelix.cmd
+++ b/build/RunTestsOnHelix.cmd
@@ -9,7 +9,6 @@ set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\d
set PATH=%DOTNET_ROOT%;%PATH%
set DOTNET_MULTILEVEL_LOOKUP=0
set TestFullMSBuild=%1
-set BuildWithNetFrameworkHostedCompiler=false
set TestExecutionDirectory=%CD%\testExecutionDirectory
mkdir %TestExecutionDirectory%
@@ -38,6 +37,7 @@ REM We downloaded a special zip of files to the .nuget folder so add that as a s
dotnet nuget list source --configfile %TestExecutionDirectory%\nuget.config
PowerShell -ExecutionPolicy ByPass "dotnet nuget locals all -l | ForEach-Object { $_.Split(' ')[1]} | Where-Object{$_ -like '*cache'} | Get-ChildItem -Recurse -File -Filter '*.dat' | Measure"
dotnet nuget add source %DOTNET_ROOT%\.nuget --configfile %TestExecutionDirectory%\nuget.config
+if exist %TestExecutionDirectory%\Testpackages dotnet nuget add source %TestExecutionDirectory%\Testpackages --name testpackages --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet6-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet6-internal-transport --configfile %TestExecutionDirectory%\nuget.config
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
index e21d8dec9c68..21fde51c351c 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets
@@ -232,6 +232,8 @@ Copyright (c) .NET Foundation. All rights reserved.
$(NuGetPackageRoot)\microsoft.net.sdk.compilers.toolset\$(NETCoreSdkVersion)
<_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage>true
+
+ <_SkipCheckMicrosoftNetSdkCompilersToolsetPackageExists Condition="'$(NuGetPackageRoot)' == ''">true
@@ -254,7 +256,7 @@ Copyright (c) .NET Foundation. All rights reserved.
diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs
index daaee1b23a72..f352d289f639 100644
--- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs
+++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs
@@ -66,7 +66,6 @@ public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_MSBuild_
testAsset.GetRestoreCommand(Log, relativePath: testProjectName)
.WithEnvironmentVariable("NUGET_PACKAGES", customPackagesDir)
- .WithEnvironmentVariable("BuildWithNetFrameworkHostedCompiler", "")
.Execute().Should().Pass();
var toolsetPackageDir = Path.Combine(customPackagesDir, "microsoft.net.sdk.compilers.toolset");
@@ -77,7 +76,6 @@ public void It_downloads_Microsoft_Net_Compilers_Toolset_Framework_when_MSBuild_
new BuildCommand(testAsset)
.WithEnvironmentVariable("NUGET_PACKAGES", customPackagesDir)
- .WithEnvironmentVariable("BuildWithNetFrameworkHostedCompiler", "")
.Execute().Should().Pass().And
.HaveStdOutContaining(Path.Combine(toolsetPackageDir, toolsetPackageVersion, "csc.exe") + " /noconfig");
}