anchor.diff:  
   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 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
   )
  
positive.code: set /p ILASMCOMPILER_VERSION=< "%~dp0tools-local\ILAsmVersion.txt"
  
  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. 1>&2
  
negative.code: :: 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 semaphore exists do nothing
  