1

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

Pourya8366
  • 3,424
  • 4
  • 21
  • 28

2 Answers2

3

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.

Linda Z
  • 312
  • 1
  • 5
  • This solved my problem. Then when I try to run the App (Debug Win AnyCPU) this appears: MSBUILD : cordova-build error : Platform windows already added. – Tony Jan 17 '17 at 22:32
0

I had disk corruption.

I was getting this error continuously. I was not able to run any exe program. After I fixed the corrupted part of the disk, the issue got solved.

Maciej Jureczko
  • 1,560
  • 6
  • 19
  • 23
Samet ÖZTOPRAK
  • 3,112
  • 3
  • 32
  • 33