Showing posts with label cordova. Show all posts
Showing posts with label cordova. Show all posts

Thursday, 3 May 2012

PhoneGap (Cordova), fail to navigate to index.html

Noticed when debugging Windows Phone 7.1 or 7.5 Mango app made with PhoneGap (Cordova) 1.6.1. The same may apply to earlier versions. Visual Studio 2010.

Error 1: fails to build with the following error


Arg :: path to project\MyProject.csproj
path to solution\ MyProject\BuildManifestProcessor.js(14, 1) Microsoft JScript runtime error : Permission denied
  
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1036,5): error MSB3073: The command "CScript "path to project\ MyProject\/BuildManifestProcessor.js" " path to project\ MyProject\ MyProject.csproj"" exited with code -1.

Reason: CordovaSourceDictionary.xml in the root of the project is read-only. Happened because it was included in the project and then added to source control.
Fix: Make sure that CordovaSourceDictionary.xml is not read-only before doing the build


The file CordovaSourceDictionary.xml  is dynamic, generated on each build by a pre-build event

However, if this file is excluded from the project, you will experience