Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 724
JamesAnd Avatar asked Jul 26 '17 15:07

JamesAnd


People also ask

How do I use ionic in Visual Studio?

Open Visual Studio 2015 and click File -> New -> Project Option for New Apache Cordova App, using Ionic Framework. New Project Window will open. Subsequently, you can select an Installed -> Template -> Java Script -> Apache Cordova Apps ->Ionic JavaScript Blank. Type Project name as ionic-App1 and click OK button.

How do you add ionic to an existing project?

For adding Ionic to an already existing Angular project, use the Angular CLI's ng add feature. This will add the necessary imports to the @ionic/angular package as well as add the styles needed.


1 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

like image 77
Rory Avatar answered Nov 02 '22 04:11

Rory