cordovavisual-studio-2015windows-10taco

"This app can't run on your PC!", when build cordova app visual studio 2015


When i try to build the cordova app in visual studio, "This app can't run on your PC!" error shown and when hit close it appears again. (First image)

This error also happen when i try to open config.xml, a messege shown in bottom of visual studio: this item does not support previewing! and "This app can't run on your PC!" error shown again too. (second image)

I'm in Windows 10 build 10586.420 and Visual studio 2015 update 3.

enter image description here enter image description here


Solution

  • The root cause of this error, which was not clear from the message on the screen, was a corrupted download of the node.exe file (where the download only pulled down a part of the package). This was likely because of quitting VS midway through installation, or just a bad install.

    After diagnosing the user's machine, we fixed the error by manually deleting node.exe. However, the real solution is to "clear cordova cache" in Tools -> Options -> Tools for Apache Cordova -> Clear Cordova cache--as seen below.

    tools -> options

    Disclosure: I work at Microsoft on the Visual Studio Tools for Apache Cordova team, and if anyone has more setup/install problems, please follow up with me at lizhong [at] microsoft [dot] com.