anchor.diff:  :: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
   if [%1]==[force] (
     if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
  -  if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
  +  if exist "%PACKAGES_DIR%\Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%\Microsoft.DotNet.BuildTools"
   )
   
   :: If semaphore exists do nothing
  
positive.code: 
  if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
  echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
  echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%"
  call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%"
  if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
    echo ERROR: Could not restore build tools correctly. 1>&2
    goto :error
  )
  
negative.code: setlocal
  
  set INIT_TOOLS_LOG=%~dp0init-tools.log
  if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages
  if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
  set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
  if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
  if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
  set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
  set BUILD_TOOLS_PATH=%PACKAGES_DIR%\Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib
  set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild
  set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
  set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed
  