我正在尝试将 jsmin.exe 作为构建后事件添加到我的 VS 2010 项目中,但是当我尝试构建我的项目时收到“错误代码 9009”。
我已经在命令提示符下进行了测试,发现如果我导航到该文件夹,然后运行
jsmin < debug.js > min.js
然后它工作正常。
但是,如果我从 C:\运行命令并输入完整路径,它会返回
'C:\Users\Andrew\Documents\Visual' is not recognized as an internal or external command, operable program or batch file.
所以我的结论是 jsmin 似乎不喜欢文件路径中的空格。鉴于 Visual Studio 的惯例是将项目存储在\Visual Studio 2010\的子文件夹中,有人可以建议我如何解决这个问题吗?
最佳答案
听起来您需要在路径周围加上双引号。
例如:
jsmin <"$(ProjectDir)\debug.js">"$(ProjectDir)\min.js"
关于javascript - Visual Studio : Running jsmin as a post-build event,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5916885/