Recently VS2015 out of the Update2, of course, is the first time the installation, the middle process twists and turns, loading and unloading load n times, also considered to be a certain number of installation experience. Now let's talk about a lot of problems.
The most appealing part of the Update2 is of course the cross-platform development section, which directly includes Xamarin, free of charge. So of course we have to try. But the installation is also a bit tricky. Since the Android SDK download must be FQ, it's best to get it done in advance. When you choose Xamarin, the installer automatically selects the N versions of the Android SDK, and it cannot be canceled, and Xamarin will be canceled. So you can just leave a version of 19 and 22, the other is canceled. Then git that component does not FQ also cannot download, can temporarily cancel out. You can install it without FQ, and you will be prompted to install it properly in addition to the Android SDK and Git.
Then you need to FQ, install Git. Finally also succeeded, looked looks like no problem.
But the problem just started haha
It will be much more convenient to do the following work first.
Install JDK, note it is best to install 32-bit, download here:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Then set the environment variables,
Talk about Xamarin first. Advanced VS2015 option settings, choose Xamarin, be sure to ensure that the right is the check mark:
The path to the Android SDK is set.
And then say Cordova. This is also the most problematic. If you follow the VS2015 installation program automatically, a new Cordova project is created, and a large possibility is not compiled. The error will be when compiling:
This app can't run on your PC
What the hell is this?
After unremitting efforts, finally found that is the problem of node. js. VS2015 's own Nodejs is a third-party version, unlike the official version. Need to upgrade to the latest version of official website:
: https://nodejs.org/en/
Download the 5.x version.
And then there's a very important place! Download is the x64 version, installation of the default path is C:\Program Files\nodejs, this is not! Be sure to change it manually and change it to C:\Program Files (x86)
Otherwise, the Cordova dependency check will not pass.
If you use your own node. js, it is likely that you will not be able to compile successfully. But it can be replaced by the official website version.
The environment variable setting is this:
Compile the time will download Gradle, if the network is not connected to the words are not, need to FQ. The download time will be longer.
Although VS2015 integrates the Cordova, it takes some luck to run normally.
If it fails, you can clear the Cordova cache in the option settings, then reopen VS2015, open the solution to clean up, and download the required libraries automatically. Generally, you can succeed. If you don't clean up the solution, you'll still fail.
In fact, the JDK version is not particularly important, vs the settings will override the system environment variable settings.
It is recommended that you combine the Ionic project template (download) and install the Ionic pack extension (download) to support Ionic IntelliSense. But there is a problem with this extension that will lead to vs flash back, and there is no workaround.
Reference article:
Getting Started with Visual Studio Tools for Apache CordovaInstall Visual Studio Tools for Apache CordovaConfigure Visual Studio Tools for Apache CordovaCreate your first app with Visual Studio Tools for Apache CordovaGet started with Ionic apps in Visual Studio
VS2015 Update2 about Cordova and Xamarin installation issues