diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 0febe696db..2cae35007a 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -262,7 +262,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) { if (!(Test-Path $installScript)) { Create-Directory $dotnetRoot $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit - $uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1" + $uri = "https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.ps1" Retry({ Write-Host "GET $uri" diff --git a/eng/common/tools.sh b/eng/common/tools.sh index a4f5d1b776..03bb934a90 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -295,7 +295,7 @@ function with_retries { function GetDotNetInstallScript { local root=$1 local install_script="$root/dotnet-install.sh" - local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh" + local install_script_url="https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.sh" if [[ ! -a "$install_script" ]]; then mkdir -p "$root" diff --git a/src/vstest.console/InProcessVsTestConsoleWrapper.cs b/src/vstest.console/InProcessVsTestConsoleWrapper.cs index 8ba865f64c..5dbdd0ea61 100644 --- a/src/vstest.console/InProcessVsTestConsoleWrapper.cs +++ b/src/vstest.console/InProcessVsTestConsoleWrapper.cs @@ -126,7 +126,8 @@ internal InProcessVsTestConsoleWrapper( ProcessHelper.ExternalEnvironmentVariables = environmentVariableBaseline; string someExistingFile = typeof(InProcessVsTestConsoleWrapper).Assembly.Location; - var args = new VsTestConsoleProcessManager(someExistingFile).BuildArguments(consoleParameters); + using var manager = new VsTestConsoleProcessManager(someExistingFile); + var args = manager.BuildArguments(consoleParameters); // Skip vstest.console path, we are already running in process, so it would just end up // being understood as test dll to run. (it is present even though we don't provide // dotnet path, because it is a .dll file).