anchor.diff:  if not defined XunitTestBinBase       set  XunitTestBinBase=%__TestWorkingDir%
   if not defined XunitTestReportDirBase set  XunitTestReportDirBase=%XunitTestBinBase%\Reports\
   
  -if not exist %__LogsDir% md %__LogsDir%
  +:: Set up msbuild and tools environment. Check if msbuild and VS exist.
   
   set _msbuildexe=
   if /i "%__VSVersion%" == "vs2017" (
  -  set "__VSToolsRoot=%VS150COMNTOOLS%"
  -  set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
  -
  -  set _msbuildexe="%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe"
  +    set "__VSToolsRoot=%VS150COMNTOOLS%"
  +    set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
  +
  +    set _msbuildexe="%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe"
   ) else if /i "%__VSVersion%" == "vs2015" (
  -  set "__VSToolsRoot=%VS140COMNTOOLS%"
  -  set "__VCToolsRoot=%VS140COMNTOOLS%\..\..\VC"
  -
  -  set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
  -  if not exist !_msbuildexe! set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
  +    set "__VSToolsRoot=%VS140COMNTOOLS%"
  +    set "__VCToolsRoot=%VS140COMNTOOLS%\..\..\VC"
  +
  +    set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
  +    if not exist !_msbuildexe! set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
   )
   
   :: Does VS really exist?
  
positive.code:     set __msbuildCommonArgs=%__msbuildCommonArgs% /p:RunTestsViaIllink=true
  )
  
  REM Prepare the Test Drop
  echo %__MsgPrefix%Removing 'ni' files and 'lock' folders from %__TestWorkingDir%
  REM Cleans any NI from the last run
  powershell -NoProfile "Get-ChildItem -path %__TestWorkingDir% -Include '*.ni.*' -Recurse -Force | Remove-Item -force"
  REM Cleans up any lock folder used for synchronization from last run
  powershell -NoProfile "Get-ChildItem -path %__TestWorkingDir% -Include 'lock' -Recurse -Force |  where {$_.Attributes -eq 'Directory'}| Remove-Item -force -Recurse"
  
  if defined CORE_ROOT goto SkipCoreRootSetup
  
  
negative.code: if not exist "%__VSToolsRoot%\VsDevCmd.bat"           goto NoVS
  
  :: Does MSBuild really exist?
  if not exist %_msbuildexe% (
      echo %__MsgPrefix%Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
      exit /b 1
  )
  
  if not defined VSINSTALLDIR (
      echo %__MsgPrefix%Error: runtest.cmd should be run from a Visual Studio Command Prompt.  Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
  