I have been using CoffeeScript files within a project and have installed grunt into the project to compile them.
I am using Grunt Launcher to compile the files manually, but I wanted to be able to do so automatically when the project is built. To this end I put the following in the pre-build event command line under the project properties:
CD $(ProjectDir)
grunt build
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1063,5): error MSB3073: grunt build" exited with code 9009
"path-to-project\node_modules\grunt\lib\grunt.js"
Thank you to anyone who had a look at this question.
After a bit of experimenting I found putting this into the pre-build event command line works:
CD $(ProjectDir)
cmd.exe grunt build