Can't find script engine JScript, or Command CScript - visual-studio-2010

I'm trying to develop an app for Windows Phone using Apache Cordova (PhoneGap). I've installed the Windows Phone SDK from Microsoft's web site (SDK 7.1 for Windows Vista+); the SDK comes with Visual Studio 2010 Express for Windows Phone. I'm also using Windows 7 Professional, 64bit.
I've imported the PhoneGap template perfectly, should be no issues here. When I try to emulate my app on the "Windows Phone Emulator", I get the following errors:
I've tried reinstalling Visual Basic/the SDK, PhoneGap countless time (plus tried different versions), I've tried everything posted previously on Stackoverflow and also from other web sites.
My JS files are being detected normally via Windows Explorer, so I don't think there is a wrong file association. I've also attempted to insert additional code, or modify code in the .csproj file and the BuildManifestProcessor.js; but no luck either.
Are there any suggestions, please?

I've found the definite solution, after trying many solutions; such as using regsvr32 attempting to fix JScript and VBScript association. Even if your associations are working perfectly, you can still receive the above error.
To solve this problem, run this tool (by Microsoft): http://support.microsoft.com/mats/windows_media_player_diagnostic/
It will solve your problem. I understand this is for Windows Media Player, but it will also fix any JS or VB.NET problems too.
It will also fix Windows Media Player problems too, such as "server execution failed"; which is caused due to JS/VB.NET too.
I am now able to begin development for Windows Phone; to be honest, I'm excited.
All the best.

Related

Visual Studio 2013 Compiler issue on Windows phone 8.1 silverlight project

Today I tried to make a windows phone application, I first stared with universal application and and it worked, emulator was running with project but when I try to use Windows.Phone.Speech namespace I couldn't do that, thus I make some research for it, Then I find the answer I need a windows phone silverlight project. When i'm trying to run a blank windows phone silverlight project I got some error like that
I couldn't find anything about it, I compare the csproj with a working wp silverlight project but I couldn't find a difference between them.
Thanks.
Check to make sure you are compiling for Any CPU or specifically for the right kind of CPU that you intend in solution properties.
I found a solution about it, but there is still some missing on my answer.
I don't know how but accidentally a blank project worked on my emulator. After that I looked up the ProjectName.csproj.user file and there were a change somekind like that
After that I added the same lines to another project, and it is worked. The main problem of this solution you need a emulator guid ID. In my solution it was 57B0267A-6444-41EB-9127-2ED594284A2D.
Thanks.

How to debug JS on Windows Phone 8.1 Cordova Project

I have been trying to debug a Windows Phone 8.1 app using Cordova on Visual Studio.
I would like to debug the Javascript in the app - set break points and such in Visual Studio.
I have tried Weinre, and it gives me DOM elements, and read logs from console, but I would like to know if there is any way I can set breakpoints in the Javascript and see if a code path is executed and look at the local variables and step-in.
I have tried to search online, but couldn't really find a good way to do this - actually I couldn't find any way that was working.
If you guys were able to find a way to debug Javascripts effectively in Windows Phone 8.1 apps, please let me know :).
Debugging Apache Cordova apps on Windows Phone targets is not yet supported in the current release but you can open up the native Windows Phone project (CordovaApp.Phone.jsproj) that's under the bld\Debug\platforms\windows folder of your Cordova project and you'll have full JS debugging support from within Visual Studio for that one.
Since this is not yet answered: You can debug Windows Phone 8.1 apps perfectly (=breakpoints, watches, ...) using Visual Studio 2015 (e.g. the free community version).

Windows 8.1 Apps not Compiling

Recently, I needed to refresh my Windows 8.1 PC, and now that I have finally finished getting all of my programs reinstalled and everything is back to normal, I am ready to finish work on my Windows 8.1 app, but I am having an issue with compiling my apps. Every time I try to compile, I get the following error.
Now normally when I need to refresh my developer licesnse, Visual Studio tells me, but this time I didn't get any prompt at all, and that is the error that I got when trying to compile. How can I fix this? I am installing updates for Visual STudio at the moment, and I am hoping that doing so will somehow magically fix the problem, but I am also aware that it probably won't.
EDIT: Now that I have updated, the message has been shortened to "Can't resolve Windows.metadata."
For some reason, even though the Windows 8.1 SDK is supposed to be installed with Visual Studio Ultimate 2013, it wasn't for me. I was able to find the Windows 8.1 SDK by Googling it, and it came up as the top result. I installed it, and suddenly all of my errors went away and Visual Studio started recognizing them as legitimate Windows 8.1 app code.

VS Express 2012, Windows Phone 8 SDK: The interface is unknown

I can't deploy applications to to my Windows Phone 8 device from Visual Studio Express 2012 anymore. I always get the following two lines in the console:
Deployment of application to device failed.
The interface is unknown.
The emulator also does not work anymore (xde.exe just crashes). All that worked once (Hyper-V is active).
All that happened without a change to my app (the same happens with a fresh hello world app).
The problem is not my phone, I tested a different phone (even different model), same problem.
I already completely removed and reinstalled the Phone SDK including Visual Studio.
The problem might have occurred since I updated to Windows 8.1 but I am not sure about this.
If anybody has a clue of what is going on here I would highly appreciate your help.
Since you've already tried removing/reinstalling VS and SDK, try creating a new user account on your Win8.1 box and running VS from that. If it works, the problem was probably some settings in CurrentUser registry hive, which Remove doesn't always clean up. Reinstall the already-installed VS and SDK may work better.
The 'interface' error means this is likely some COM issue, and that implicates registry. If you can figure out which DLL contains the interface, you may be able to fix it with (admin command line) > REGSVR32 <dllPath>. You can trace the registry accesses being made when you try to debug the app via SystemInternals ProcessMonitor

Windows Phone Application Project Type Unavailable in VS2010

I recently had to reinstall the OS on my dev box and I am now in the process of reinstalling various applications. I had previously installed the WP7 SDK without any problems but unfortunately I'm having problems this time around. The only project type I have available in the Silverlight for Windows Phone category is one that I downloaded from the online templates section.
When I try to open it or any of the WP7 projects I created previously I get a "The project type is not supported by this installation." error. I am not sure what I am missing. I have followed the three steps listed here so I've installed the SDK, the Dev Tools and the Dev Tools fix. The installation of VS2010 itself seems to be fine as I can create ASP.NET and Silverlight applications and run them without any problems.
Has anyone encountered something like this before?
Edit: I have installed Service Pack 1 for VS 2010 but that hasn't helped unfortunately.
Edit: I have also re-installed the Windows Phone Dev Tools and that installation reported no errors but I still get no projects under the Silverlight for Windows Phone category.
Try opening a visual studio command prompt and typing:
devenv /ResetSkipPkgs
I have thankfully resolved this. Last night I uninstalled everything and reinstalled again but this time I made sure to right-click on each executable and select "Run as administrator". That seems to have done the trick as my existing WP7 projects are compiling and running successfully and I can create new ones too. I did run into two error messages however -
"Zune software is not launched. Retry after making sure that Zune software is launched". I got around this initially by setting the target to Windows Phone 7 Emulator instead of Windows Phone 7 Device in the target dropdown on the main toolbar.
"Error: Connection failed because of invalid command-line arguments." I got around this by rebooting as mentioned here.

Resources