TaskKill for killing .NET console application
问题 I have a bunch of console host applications hosting WCF services. I'm calling a .bat file as a pre build step to kill any running host instances so that I don't get WCF channel registrations errors(manually killing the console hosts each time before a build is a royal pain). The .bat file I've created contains the following. taskkill /T /F /FI "imagename eq Host.vshost.exe" taskkill /T /F /FI "imagename eq Host.exe" exit /B 0 This kills both processes. I can see in taskmanager that Host.exe