I'm trying to get a pre-build event setup in visual studio 2012 for compressing my Durandaljs app using Gulp. After much frustration with the pre/post build command line I have it working if I build the project. It runs node/gulp as expected.
My issue now is when I goto publish my project using the publish dialog (web deploy) the command fails with "exited with code 255." along with first alerting "Server was unexpected at this time." I'm having trouble finding much information on this error combination and I don't know what else to try.
if $(ConfigurationName) == Release (
"C:\Program Files\nodejs\node.exe" "$(ProjectDir)node_modules\gulp\bin\gulp.js" --gulpfile "$(ProjectDir)gulpfile.js" --cwd "$(SolutionDir)ProjectName" --no-color durandal
)
Edit: I've reduced the issue down further. It has nothing to do with Gulp, rather it is something with node running from the build command line. I am running a simple helloworld.js file piped into node and it is the same behavior. It works fine on build, however, on publish it gives the same errors.