1 @if not defined _echo @echo off
2 setlocal EnableDelayedExpansion
5 if not defined NO_DASHES_ARG goto no_help
6 if /I [%NO_DASHES_ARG:-=%] == [?] goto Usage
7 if /I [%NO_DASHES_ARG:-=%] == [h] goto Usage
10 :: Check if VBCSCompiler.exe is running
11 tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul
12 :: Compiler is running if errorlevel == 1
14 echo Stop VBCSCompiler.exe execution.
15 for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F
18 :: Strip all dashes off the argument and use invariant
19 :: compare to match as many versions of "all" that we can
20 :: All other argument validation happens inside Run.exe
21 if not defined NO_DASHES_ARG goto no_args
22 if /I [%NO_DASHES_ARG:-=%] == [all] (
23 echo Cleaning entire working directory ...
29 if [%1]==[] set __args=-b
30 call %~dp0run.cmd clean %__args% %*
35 echo Usage: clean [-b] [-p] [-c] [-all]
36 echo Repository cleaning script.
38 echo -b - Delete the binary output directory.
39 echo -p - Delete the repo-local NuGet package directory.
40 echo -c - Deletes the user-local NuGet package cache.
41 echo -all - Cleans repository and restores it to pristine state.
43 echo ^If no option is specified then "clean -b" is implied.