.netnode.jscordovavisual-studio-2013visual-studio-cordova

Error creating an Apache Cordova project in Visual Studio


I've been involved with this issue since I installed Cordova Tools for VS2013 Update 4. I've been searching and trying a lot of solutions, but none of them works.

At first moment after the installation, I couldn't found the Apache Cordova Templates. Then I tried a solution from Stack Overflow and now I can see them:

Available projects

With anyone (I'm trying first with Blank App) I get always the same error message while Visual Studio creates the project:

Main Error

The imported project 'C:\Program Files(x86)\MSBuild\Microsft\VisualStudio\v12.0\Javascript\Microsoft.VisualStudio.Javascript.Common.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Program Files (x86\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets

I wrote the message for someone that maybe is looking for the same error.

Data:

I navigated to Tools -> Options -> Tools for Apache Cordova and then I got this:

Tools Error

The 'AutoLoadPackagePackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml'

These are the entries for that error in that file:

  <entry>
    <record>743</record>
    <time>2015/05/01 16:08:21.331</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [AutoLoadPackagePackage]</description>
    <guid>{E0F14200-4DD7-4F1A-8F2B-DA3B91F8E889}</guid>
    <hr>80131604</hr>
    <errorinfo>Exception has been thrown by the target of an invocation.</errorinfo>
  </entry>
  <entry>
    <record>744</record>
    <time>2015/05/01 16:08:21.369</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [AutoLoadPackagePackage]</description>
    <guid>{E0F14200-4DD7-4F1A-8F2B-DA3B91F8E889}</guid>
    <hr>80131604</hr>
    <errorinfo>Exception has been thrown by the target of an invocation.</errorinfo>
  </entry>

I also updated Node.js. I understand there is a issue between Visual Studio and Node.js.

References:

Unable to create Apache Cordova project in Visual Studio 2013
Cordova Multi-Device Hybrid Apps (Preview) for Visual Studio | Can't load project
Visual Studio/Multi Device Hybrid Apps CTP / Cordova - The imported project was not found
Error when installing Visual Studio Tools for Apache Cordova CTP3.0 in Visual Studio 2013
Visual Studio Apache Cordova Build Error - cannot find module


Solution

  • It seems like you have multiple versions of VS Cordova tools installed. I would recommend to uninstall all the previous versions of the tools and start afresh. You can install VS 2015 RC Tools from here. Thanks for using our tools.