Windows 8 is released by Microsoft which had major changes to the UI experience to compete with the other major mobile platforms like Android and iOS. As with all Microsoft related stuff, Windows mobile app development environment can be set up only on the Windows machines.
Visual Studio
You need to download Visual Studio from the below link.
https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
Visual Studio is the IDE supported by Microsoft for developing apps using Microsoft related technologies.
Once the Visual Studio is downloaded, double click on downloaded installer to start the installation process and follow the instructions to complete the installation of visual studio.
Once visual studio is installed, launch visual studio.
Windows Phone tools
Select File –> New –> Project.
In the New Project Wizard, select Installed –> Templates –> Windows 8 and the tools required for creating Windows mobile project are displayed.
If the tools are already installed, then the other project related fields like Name, Location etc. are enabled, else the below Message is displayed.
Click on ‘Install’ to download the Windows Phone related tools and SDK’s. Once the installer is downloaded, double click on the installer to download and installer the Windows phone related tools.
If the Visual studio is open, close it and click on Retry in the below screen to continue installation of Windows mobile development environment.
The installer displays the list of packages that will be installed. Just click on ‘Next’ to continue installation.
Click on ‘Update’ to install the selected features. It will take considerable time based on bandwidth available since the installer that has to download is almost 4 GB of data.
Windows Phone project
Once the installation is completed, launch the Visual Studio to create and run a sample windows app.
Select File –> New –> Project. And in the New Project wizard, select Installed –> Templates –> Visual Basic –> Windows –> Windows 8 –> Blank App(Windows Phone)
Provide the App Name and the Location where you want to create the project and click on ‘OK’.
Visual Studio creates the Windows Phone project.
Select the emulator on which you want to run the demo app you created.
This will start building the project and launching the emulator.
The Windows Phone emulator is not fast and so it will take some time before the emulator is started.
The windows phone emulator is launched and the demo app is launched on the emulator. The app doesn’t display any thing which is totally fine, since it is just a template app and we didn’t make any changes to display in the app.
Issues with Emulator
While launching the emulator, you may run into some issues like the below. You may see the below message even if the virtualization is enabled on the system.
To work around this problem, go to Control panel –> Programs and Features –> Turn Windows features On or Off.
Check if all the Hyper-V features highlighted above are enabled. If they are not enabled, enable them. If they are enabled already, disable them, restart the machine and enable them again and restart the machine.
Then you may see the below message, just click on ‘Retry’ if you see a similar message.
Then you may see the below window, which asks whether you want to connect the emulator to the internet. Click on Ýes’ to allow the emulator to connect to the internet. During this process the network of your system may be disconnected for a while before it reconnects automatically.
The above steps should help in resolving any issues with launching the emulator.
Apache Cordova Environment
To create a Cordova project using Visual studio, select File –> New –> Project
In the New Project wizard, search for Cordova and the New Project wizard displays the list of Cordova project templates available.
Select ‘Install Tools for Apache Cordova Update 1’ for JavaScript.
If the required Windows Mobile tools etc. are not downloaded along with the version of Visual Studio you downloaded, the below message will be displayed.
Click on Ínstall’ to download the required tools for developing mobile apps.
Click on ‘Next’ to download and install the required tools for developing Apache Cordova apps using Visual Studio.
Click on Úpdate’ to start the download and install the Apache Cordova tools for Visual Studio.
Installing Cordova tools for Visual Studio requires around 10 GB of disk space, so make sure your disk has required disk space. Also downloading 10 GB of information over the internet is going to take considerable time.
Select File –> New –> Project and in New Project wizard select Installed –> Templates –> JavaScript –> Apache Cordova Apps. Select ‘Blank App (Apache Cordova)’ and provide the project name and location and click on ‘OK’.
Visual Studio creates a new Cordova app project.
Select the mobile os you want to emulate(highlighted in red) and then select the device model you want to emulate(highlighted in green).
This will launch the mobile emulator.
And the below message will be displayed in the emulator and since it is just a template app, the message displayed is fine.
Open index.html in the www folder and change the message displayed in the index.html to any other message and relaunch the app in emulator.
The modified message should be displayed in the emulator.
We have set up the development environment for creating windows mobile apps and learnt how to run the windows phone emulators.