How to use Ionic 3 with MS Visual Studio Community 2017?

Viewed 13397

I've been using Ionic 2 with MS Visual Studio Community 2017 for quite some time now. In the Visual Studio Market the plugin Ionic 2 Templates for VS can be downloaded and used.

It is as simple as clicking:

New Project > TypeScript > Mobile Apps > Ionic 2 - Blank

However I can not find a template for Ionic 3. ( seems not released yet)

Any idea how to manually add Ionic 3 to Visual Studio?

Thanks!

2 Answers

I'm just getting started so this might be not quite right, but I did the following:

  • Ensure you have the Cordova workload installed through VS2017 installer.
  • Create a new project using VS2017 and the Ionic 2 template
  • Install Ionic latest if you haven't, via the command line:
    • npm install -g ionic@latest
  • Create a new Ionic 3 app, via the command line. Use sidemenu or tabs or blank depending on what template you want to use. I see there's a ton more in https://market.ionic.io/starters/ which you can probably use somehow.
    • ionic start YourNewAppName sidemenu
  • Copy files from your Ionic 2 project folder into your Ionic 3 project folder:
    • taco.json
    • XXXX.jsproj (don't rename just yet)
    • XXXX.sln (don't rename just yet)
  • Launch the XXXX.sln in VS2017
    • VS prompted me to upgrade project file, OK.
    • VS prompted me to set version of typescript, OK.

Now the .sln file works for editing & running the Ionic 3 project

Related