Visual Studio: running jsmin as event after build

I am trying to add jsmin.exe as a post-build event to my VS 2010 project, but when I try to create my project I get an "error code 9009".

I tested on the command line and found that if I go to the folder, run

jsmin < debug.js > min.js

Then it works great.

However, if I run the command from C: \ and enter the full path, it will return

'C: \ Users \ Andrew \ Documents \ Visual' is not recognized as an internal or external command, operating program, or batch file.

So my conclusion is that jsmin does not look like spaces in the file path. Given that the Visual Studio convention is to save projects in a subfolder of \ Visual Studio 2010 \, can anyone suggest how I can work around this problem?

+5
source share
1 answer

It looks like you need to put double quotes along the way.

eg:.

jsmin <"$ (ProjectDir) \ debug.js"> "$ (ProjectDir) \ min.js"

+5
source

All Articles