anchor.diff:  echo Initializing BuildTools ...
   echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
   call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
  +set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL%
  +if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
  +  echo ERROR: An error occured when trying to initialize the tools. Please check '%INIT_TOOLS_LOG%' for more details.
  +  exit /b %INIT_TOOLS_ERRORLEVEL%
  +)
   
   :: Create sempahore file
   echo Done initializing tools.
  
positive.code: powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> %INIT_TOOLS_LOG%
  if NOT exist "%DOTNET_LOCAL_PATH%" (
    echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
    goto :EOF
  )
  
  :afterdotnetrestore
  
negative.code: @if "%_echo%" neq "on" echo off
  setlocal
  
  set INIT_TOOLS_LOG=%~dp0init-tools.log
  