我正在尝试在 Visual Studio 2010 中使用框架phonegap 为 Windows Phone 7 创建一个应用程序。但是当我尝试编译该项目时出现错误。错误是:
Error 1
The command "CScript "C:\Users\Alan\documents\visual studio 2010\Projects\PhoneGapStarter\PhoneGapStarter\BuildManifestProcessor.js" "C:\Users\Alan\documents\visual studio 2010\Projects\PhoneGapStarter\PhoneGapStarter\PhoneGapStarter.csproj"" exited with code 1. PhoneGapStarter
我正在使用phonegap库1.6.1(cordova),但我看不出问题是什么。 我尝试再次下载该库并将其添加到项目中,但这没有帮助。
我能做什么?
最佳答案
我遇到了这个问题,这是因为 CScript 的环境变量没有设置。
我通过直接引用 cscript.exe 修复了它。您可以通过在文本编辑器中打开 csproj 文件并更改此行来完成此操作
<PreBuildEvent>CScript "$(ProjectDir)/ManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
到
<PreBuildEvent>C:\windows\system32\cscript.exe "$(ProjectDir)/ManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
或者您可以添加新的环境变量
关于visual-studio - PhoneGap 中出现错误,Visual Project 2010 : The command CScript exited with code 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10289025/