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