Reputation: 31
I'm trying to make an application for windows phone 7 with the framework phonegap, in Visual Studio 2010. But I get an error when I'm trying to compile the project. The error is:
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
I'm using the phonegap library 1.6.1 (cordova), but I can't see what the problem is. I tried to download the library again and added it to the project, but that didn't help.
What can I do?
Upvotes: 2
Views: 3014
Reputation: 37
Had this issue because .js
files were associated with another app, which was PhpStorm in my case, but could be any other in your case, e.g Notepad++
Sorted out by running following in the command prompt (as Administrator):
regsvr32 %systemroot%\system32\jscript.dll
assoc .js=JSFile
Upvotes: 0
Reputation: 31
Yes in effect, that was the problem, the error was the enviroment of windows for the js scripts.
So, the solution for this problem was the next:
As administrator, run the next script in the comand line (cmd).
--> regsvr32 %systemroot%\system32\jscript.dll
Once to the script was run, download the following file (vista_js_fix.reg) and run as administrator.
Upvotes: 1
Reputation: 43
Try to find CordovaSourceDictionary.xml and check if it is read-only. If so, make it writable.
Upvotes: 2
Reputation: 183
I had this problem and it was because the environmental variable for CScript wasn't set up.
I fixed it by referencing the cscript.exe directly. You can do this by opening the csproj file in a text editor and changing this line
<PreBuildEvent>CScript "$(ProjectDir)/ManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
to
<PreBuildEvent>C:\windows\system32\cscript.exe "$(ProjectDir)/ManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
or you can add a new environmental variable
Upvotes: 2