6

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.

Particleman
  • 661
  • 2
  • 7
  • 19
  • Check if you are using a variable called "Server" that was not defined. The error looks similar to a var_not_defined error in batch scripts – Zasz Oct 03 '14 at 16:01
  • Open up a command prompt, and run gulp from your project directory. I know it's extra layers of abstraction, but I tend to simply pass the projectdir and configurationname to a batch file, then run from there, or call into npm. I'm guessing it's an issue with your script. – Tracker1 Dec 29 '14 at 23:46

0 Answers0