Do you use PowerShell to run batch files in Visual Studio?

Updated by Brady Stroud [SSW] 1 year ago. See history

123

Windows Command Processor (cmd.exe) cannot run batch files (.bat) in Visual Studio because it does not take the files as arguments. One way to run batch files in Visual Studio is to use PowerShell.

❌ Figure: ![Bad example - Using Windows Command Processor (cmd.exe) for running batch files.](/uploads/rules/do-you-use-powershell-to-run-batch-files-in-visual-studio/BadBatch_small.jpg)

✅ Figure: ![Good example - Using PowerShell for running batch files](/uploads/rules/do-you-use-powershell-to-run-batch-files-in-visual-studio/goodbatch_small.jpg)

acknowledgements
related rules