@@ -153,6 +153,16 @@ function InitializeDotNetCli([bool]$install) {
153153
154154 # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
155155 Write-PipelinePrependPath - Path $dotnetRoot
156+
157+ # Work around issues with Azure Artifacts credential provider
158+ # https://github.com/dotnet/arcade/issues/3932
159+ if ($ci ) {
160+ $env: NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
161+ $env: NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20
162+ Write-PipelineSetVariable - Name ' NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' - Value ' 20'
163+ Write-PipelineSetVariable - Name ' NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' - Value ' 20'
164+ }
165+
156166 Write-PipelineSetVariable - Name ' DOTNET_MULTILEVEL_LOOKUP' - Value ' 0'
157167 Write-PipelineSetVariable - Name ' DOTNET_SKIP_FIRST_TIME_EXPERIENCE' - Value ' 1'
158168
@@ -365,7 +375,6 @@ function InitializeBuildTool() {
365375 Write-PipelineTelemetryError - Category " InitializeToolset" - Message " /global.json must specify 'tools.dotnet'."
366376 ExitWithExitCode 1
367377 }
368-
369378 $buildTool = @ { Path = Join-Path $dotnetRoot " dotnet.exe" ; Command = " msbuild" ; Tool = " dotnet" ; Framework = " netcoreapp2.1" }
370379 } elseif ($msbuildEngine -eq " vs" ) {
371380 try {
@@ -490,6 +499,13 @@ function Stop-Processes() {
490499function MSBuild () {
491500 if ($pipelinesLog ) {
492501 $buildTool = InitializeBuildTool
502+
503+ # Work around issues with Azure Artifacts credential provider
504+ # https://github.com/dotnet/arcade/issues/3932
505+ if ($ci -and $buildTool.Tool -eq " dotnet" ) {
506+ dotnet nuget locals http- cache - c
507+ }
508+
493509 $toolsetBuildProject = InitializeToolset
494510 $path = Split-Path - parent $toolsetBuildProject
495511 $path = Join-Path $path (Join-Path $buildTool.Framework " Microsoft.DotNet.Arcade.Sdk.dll" )
0 commit comments