Native Cross-Platform in Visual Studio

Introduction

Working with HTML and JavaScript

Working with .NET framework / Xamarin

Working with Visual C++

Conclusion


Introduction

In Visual Studio 2015 you can build same apps for different devices, such as Android, iOS, and Windows. In design process you will have the access to many design tools in Visual Studio that will allow you to add many connected services, like Azure Mobile Services, Application Insights and Office 365.

What is really good is that you don’t have to use specific coding language, you can use your preferred coding language, such as C# and the .NET Framework, HTML and JavaScript, or C++. You can even share code, images, strings and even the user interface in some cases.

0-Native Cross-Platform in Visual Studio

Working with HTML and JavaScript

If you don’t have Visual Studio 2015 installed yet, you will have to download and install it first. In setup process choose HTML/JavaScript (Apache Cordova) feature.

Apache Cordova is a framework which is including a plug-in model, that enables the sharing of files for other types of web applications, without having to redesign or modify them.

After you created your first project and you want to run your app, you can choose between different emulators to do that or you can even run it in a browser or on a device which is connected directly to your computer. The most used emulators are Apache Ripple emulator or Visual Studio Emulator and they are used for Android or Windows Phone.

1-HTML and JavaScript Apache Cordova Visual Studio

Working with .NET framework / Xamarin

First you will need to have installed Visual Studio 2015. In installation process you will have to choose Custom installation and select Cross Platform Mobile Development > C#/.NET or you can simply use the Xamarin Installer.
If you already have Visual Studio 2015 installed, in Programs and Features select the same Custom option for Xamarin as above.

When you’ll create new project and when you will want to see how it works, you can use the Android emulator for Android apps, for Windows you can run apps natively or also you can use Windows Phone emulator. For iOS project you will start Mac emulator and you will have to connect to a networked Mac.

2-Xamarin Native Cross-Platform in Visual Studio

Working with Visual C++

Again you will have to have first installed Visual Studio 2015 and also in this case you will have to install the Visual C++ for Cross Platform Mobile Development tools. This option is available for now only for Android or Windows app, it’s not yet available for iOS apps.

You will have the chance to choose between many templates, some of them are native and can be used for both solutions (Android and Windows) and some of them targets on Windows.

When your project is ready and you want to see how it looks, you can use Visual Studio Emulator for Android or Windows.

3-Working with Visual C++ Visual Studio

Conclusion

The native cross platforms were a big improvement for many developers. In the old Visual Studio Build system was pretty hard to do open source and cross platform tasks. This solution is really out of the box and it was major step forward, especially when building app for iOS. Previously you would have to be on Mac to build iOS app, but now this is all possible with this cross-platforms in Visual Studio 2015.

Share This: