I try to start an instance of grunt watch whenever a particular project is started from VisualStudio. I have a one-page application written in ember and compiled with grunt that connects to a backend written using WebAPI. I am trying to reduce friction so that I can start debugging (F5) in VS and get everything I need.
If I add a post-build event to compile the application using grunt, it works fine:
node node_modules\grunt-cli\bin\grunt dev --no-color
grunt watch never ends, so a VisualStudio assembly is created until you finish the node.exe process (which is mostly expected, except that it cannot use Ctrl + Break to stop in VS):
node ../node_modules\grunt-cli\bin\grunt watch --no-color
I tried to start with the start command, but VisualStudio is still waiting for it to exit (just saying "Build started ..."):
start node ../node_modules\grunt-cli\bin\grunt dev
I also tried with the start /i option, but that does not help. It opens a new window with grunt watch , but the assembly does not continue (and the application does not start) until I close the console window.

Presumably this is because the process is a child of the build process? Is there a real way to run a background task without waiting for VisualStudio?
source share