Please enable Javascript to correctly display the contents on Dot Net Tricks!

Xamarin with Visual Studio 2017 - Build native cross-platform apps

  Author : Shailendra Chauhan
Posted On : 08 Mar 2017
Total Views : 4,023   
Updated On : 08 Mar 2017
 

Along with the launch of Visual Studio 2017, Microsoft has released many fresh and exciting features for mobile developers to develop cross-platform mobile apps using Xamarin. Visual Studio 2017 will help you to build better native cross-platform apps in less time as compared to Visual Studio 2015.

In this article, you will learn about how to setup Visual Studio 2017 for xamarin development and what are the new features Visual Studio 2017 supports for mobile apps development using C# and Xamarin.

Install the Visual Studio 2017 IDE

To get started with Xamarin apps development, download Visual Studio 2017 and install it on your windows machine. The VS 2017 is compatible with Windows7 SP1, 8, 8.1 and Windows 10. You can download it at Visual Studio 2017. I have installed it on Windows 10.

Install the Visual Studio 2017 IDE

Setting up Xamarin

Visual Studio 2017 is a lightweight IDE than ever! The new Visual Studio installer enables you to choose components which you want to install. This strategy keep the Visual Studio installation smaller than ever before and it installs the updates faster too.

Setting up Xamarin in Visual Studio 2017 IDE

Setting up Visual Studio 2017 for Windows Universal Platform Development

If you want to develop UWP apps using Xamarin then you have to install Universal Windows app components as well as shown in following fig.

Visual Studio 2017 for Windows Universal Platform Development

Setting up Visual Studio Emulators for Android and Windows 10

Visual Studio includes an Android emulator and Windows 10 Emulator that can be used to test and debug an Xamarin.Android and Xamarin Forms apps. The Android emulator uses the Hyper-V capabilities of development machine which results in faster launch and execution times than the default android emulator that comes with the Android SDK. To install both the emulators just navigate to individual components option and check the options in the following fig.

Install the Visual Studio 2017 IDE

Note

To run the visual studio emulators, your machine must meet the requirements to run Hyper-V. Hyper-V requires a 64-bit version of the Pro edition of Windows 8, Windows 8.1, Windows 10, or higher.

Install the Visual Studio 2017 IDE

Verify your Xamarin Installation

Once installation is complete, you should verify your Xamarin development environment.

Verify your Xamarin Installation

Visual Studio 2017 Xamarin.Forms Preview supports

With Visual Studio 2017 and latest release of Visual Studio for Mac, Xamarin.Forms XAML page you can preview in Xamarin.Forms Previewer to see expected layouts and design in Android and iOS device. make sure you have installed the latest Java 1.8 x64 for Android previewing. To open Xamarin.Forms Preview follow the following steps as shown in given fig.

XAML
Verify your Xamarin Installation

Improved Xamarin.Forms XAML IntelliSense

With Visual Studio 2017, any Xamarin.Forms XAML page now supports improved IntelliSense experience for code completion, bindings, custom properties, custom controls, converters, and much more.

Verify your Xamarin Installation

Creating Xamarin Forms App with Visual Studio 2017

In Visual Studio, create a new Blank App (Xamarin.Forms Portable) solution and name it XamarinFormsApp. You can find this template easily under Visual C# option for Cross-Platform.

Verify your Xamarin Installation

After clicking OK to create the solution, you’ll get two templates for creating app. Choose Blank app template with with UI technology Xamarin.Forms and Code Sharing Strategy Portable Class Libary (PCL).

Verify your Xamarin Installation

It will create a Xamarin Forms application with four projects targeting Android, iOS and Windows UWO app. Within each native project you have access to the native designer for the corresponding platform and can implement platform specific screens and functionality as needed.

Verify your Xamarin Installation

Now build the application and run it for Android device. You will get the following output in your Visual Studio Android Emulator.

Running Xamarin Forms App

Congrats, you have successfully build your first native cross platform mobile apps for Android, iOS and Windows UWP.

What do you think?

Thank you for your time, I hope you enjoyed this article and found it useful. Please add your comments and questions below. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.



ABOUT AUTHOR

Shailendra Chauhan
Author, Architect, Corporate Trainer and Microsoft MVP

He is the author of some of most popular e-books which encompass technical Interview on Node.js Interview Questions and Answers, ASP.NET MVC Interview Questions and Answers, AngularJS Interview Questions and Answers and LINQ Interview Questions and AnswersKnow more...

Free Interview Books
 
COMMENTS (0)
6 JUL
ASP.NET Core with Angular4 Development (Online)

7:00 AM-9:00AM IST(+5:30 GMT)

Know More
5 JUL
NodeJS with Angular4 Development (Online)

08:00 PM-09:30 PM IST(+5.30 GMT)

Know More
1 JUL
ASP.NET MVC with Angular4 Development (Online)

03:30 PM-05:30 PM IST(+5.30 GMT)

Know More
1 JUL
ASP.NET MVC with Angular4 Development (Classroom)

8:00 AM-10:00 AM

Know More
1 JUL
ASP.NET Core with Angular4 Development (Classroom)

3:00PM 5:00PM

Know More
1 JUL
Xamarin Forms : Build Cross-platform Apps (Classroom)

3:00 PM 5:00 PM

Know More
1 JUL
MEAN Stack 2 Development (Classroom)

11:00 AM-12:30 PM

Know More
30 JUN
ASP.NET MVC with Angular4 Development (Online)

07:00 AM-09:00 AM IST(+5.30 GMT)

Know More
29 JUN
Hadoop Development cum Administration (Online)

7:00 AM-9:00AM IST(+5:30 GMT)

Know More
26 JUN
Xamarin Forms : Build Cross-platform Apps (Online)

9:30PM- 11:00PM IST(+5:30GMT)

6 JUN
ASP.NET MVC with Angular4 Development (Online)

09:00 PM-11:00 PM IST(+5.30 GMT)(TT)

3 JUN
ASP.NET MVC with Angular4 Development (Classroom)

4:00 PM-5:30 PM Weekend

20 MAY
Angular2 and Angular4 Development (Online)

08:00 AM-10:00 AM IST(+5.30 GMT) Weekend

20 MAY
NodeJS with Angular4 Development (Classroom)

5:30 PM-7:00 PM Weekend

8 MAY
ASP.NET MVC with Angular4 Development (Online)

07:00 AM-09:00 AM IST(+5:30 GMT) M/W/F

2 MAY
ASP.NET Core Development (Online)

07:00 AM - 09:00 AM IST( TUS, THR)

29 APR
ASP.NET MVC with Angular2 Development (Classroom)

9:30 AM-11:00 AM

BROWSE BY CATEGORY
 
 
LIKE US ON FACEBOOK
 
+