anchor.diff:  :args-done
   
   rem -----------------------------------------------------------------------------
  +rem -- restore packages for solutions
  +rem -----------------------------------------------------------------------------
  +
  +rem -----------------------------------------------------------------------------
   rem -- clean solutions
   rem -----------------------------------------------------------------------------
  -
  -if %build-clean%==1 (
  -    call :clean-a-solution "%build-root%\common\build\windows\common.sln"
  -    if not %errorlevel%==0 exit /b %errorlevel%
  -    
  -    call :clean-a-solution "%build-root%\eventhub_client\build\windows\eventhubclient.sln"
  -    if not %errorlevel%==0 exit /b %errorlevel%
  -)
   
   rem -----------------------------------------------------------------------------
   rem -- build solutions
   rem -----------------------------------------------------------------------------
   
  -call :build-a-solution "%build-root%\common\build\windows\common.sln"
  +rem -----------------------------------------------------------------------------
  +rem -- build with CMAKE and run tests
  +rem -----------------------------------------------------------------------------
  +
  +rmdir /s/q %USERPROFILE%\cmake
  +rem no error checking
  +
  +mkdir %USERPROFILE%\cmake
  +rem no error checking
  +
  +pushd %USERPROFILE%\cmake
  +cmake -Drun_longhaul_tests:BOOL=%CMAKE_run_longhaul_tests% -Drun_e2e_tests:BOOL=%CMAKE_run_e2e_tests% %build-root% -Dskip_unittests:BOOL=%CMAKE_skip_unittests% %build-root%
   if not %errorlevel%==0 exit /b %errorlevel%
   
  -call :build-a-solution "%build-root%\eventhub_client\build\windows\eventhubclient.sln"
  +msbuild /m eventhub_client.sln
   if not %errorlevel%==0 exit /b %errorlevel%
   
  -rem -----------------------------------------------------------------------------
  -rem -- run unit tests
  -rem -----------------------------------------------------------------------------
  +ctest -C "debug" -V
  +if not %errorlevel%==0 exit /b %errorlevel%
   
  -if %skip-tests%==1 (
  -    echo Skipping unit tests...
  -) else (
  -    call :run-unit-tests "common"
  -    if not %errorlevel%==0 exit /b %errorlevel%
  -
  -    call :run-unit-tests "eventhub_client"
  -    if not %errorlevel%==0 exit /b %errorlevel%
  -)
  -rem -----------------------------------------------------------------------------
  -rem -- run end-to-end tests
  -rem -----------------------------------------------------------------------------
  -
  -set __skip=1
  -if %skip-tests%==0 if %skip-e2e-tests%==0 set __skip=0
  -
  -if %__skip%==1 (
  -    echo Skipping end-to-end tests...
  -) else (
  -    call :run-e2e-tests "eventhub_client"
  -    if not %errorlevel%==0 exit /b %errorlevel%
  -)
  -
  -rem -----------------------------------------------------------------------------
  -rem -- done
  -rem -----------------------------------------------------------------------------
  -
  +popd
   goto :eof
   
   
  
positive.code: 
  msbuild /m %build-target% "/p:Configuration=%build-config%;Platform=%build-platform%" %2
  if not %errorlevel%==0 exit /b %errorlevel%
  goto :eof
  
  
  :_run-tests
  rem // discover tests
  set test-dlls-list=
  set test-dlls-path=%build-root%\%~1\build\windows\%build-platform%\%build-config%
  for /f %%i in ('dir /b %test-dlls-path%\*%~2*.dll') do set test-dlls-list="%test-dlls-path%\%%i" !test-dlls-list!
  
  if "%test-dlls-list%" equ "" (
      echo No unit tests found in %test-dlls-path%
      exit /b 1
  )
  
  rem // run tests
  echo Test DLLs: %test-dlls-list%
  echo.
  vstest.console.exe %test-dlls-list%
  if not %errorlevel%==0 exit /b %errorlevel%
  goto :eof
  
negative.code: @REM Copyright (c) Microsoft. All rights reserved.
  @REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
  
  @setlocal EnableExtensions EnableDelayedExpansion
  @echo off
  
  