4

I am having trouble creating an Apache Cordova project in Visual Studio 2013 with their new CTP1.1 patch that enables support for these project types. I had my environment working and building but I needed to get TypeScript working so I can use the DefinitelyTyped Packed which provides the types you need to hook up to the Cordova API. So I have installed this package:

DefinitelyTyped\Cordova

But I noticed that I could not add in my own TypeScript File type which then tells Visual Studio that this needs to be compiled using TypeScript. The project template comes with a index.ts which does work correctly because the project file has this in there:

So i needed to have this type included to be able to update the project file with these entires without hacking about in the project file each time i needed to add a .ts file. (Which I would add as a .js and then rename it to .ts). I then found an installer for Visual Studio 2013 Update 2 for TypeScript here:

Typescript Installer

Now I recieve an error which means I cannot create the project type anymore, but all the other project types are okay, which to me means that it is related to the TypeScript installation that I just did:

The imported project "C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Javascript\Microsoft.VisualStudio.Javascript.Common.targets" was not found. Confirm that the path .... etc.

My question is ... How do I resolve this? Or ... How is everyone else using the Cordova API in Visual Studio 2013 Update 2 CTP1.1 without using TypeScript?

Any help will be appreciated, thanks in advance!

Leandro Bardelli
  • 10,561
  • 15
  • 79
  • 116
Norbet
  • 41
  • 2
  • That sounds awful. Have you tried "repairing" the Visual Studio install? – TrampSansTom Oct 07 '14 at 01:37
  • I have indeed, Visual Studio doesn't uninstall properly. Microsoft have now release version 2.0 of the CTP so I am going to try that. Failing this, I will just use intel XDK instead. – Norbet Oct 11 '14 at 13:12
  • For me, it works on VS2013 premium on office PC but shows above message on VS2013 community version. @microsoft, that is not fair – IsmailS Apr 13 '15 at 08:33
  • I'm going to try [this](http://stackoverflow.com/a/24249493/148271) or [this](http://stackoverflow.com/a/25489793/148271) – IsmailS Apr 13 '15 at 08:43
  • I solved it this morning by copying a colleagues Javascript folder and pasting it in. No amount of reinstalling fixed anything. Problem now is that I cannot open *any* of my projects in VS2013 because they are "incompatible".... :/ – Barrie Reader Aug 13 '15 at 08:49

1 Answers1

0

The project creation issues may be fixed now since there were several new CTP releases of the Cordova tools and they have reached RTM in Visual Studio 2015. It looks like this issue was also solved in the comments (though separate issues came up). I work in the team that builds these Cordova tools and I know that we fixed may installation issues since the CTP 1.1 release, so I'd suggest upgrading.

Also, since it was mentioned in this question - Here's some guidance for using TypeScript files in Visual Studio with Apache Cordova:

https://github.com/Microsoft/cordova-docs/blob/master/getting-started/tutorial-typescript.md

Jordan Matthiesen
  • 1,480
  • 7
  • 17