So we have seen the need to use Xamarin. So lets get started. This article covers installation in Visual Studio on a Windows device

 

Installation in Visual Studio

The simplest way to install is just to select the relevant options in the  Visual Studio installer when making a fresh installation or when updating a current installation. Focusing upon Visual Studio 2017 Update 4 for Windows you can start the installation here. There is also a Mac installation version of Visual Studio and  Xamarin from that link, although I haven’t tried that, yet.

 

If doing a manual selection In the installer for Visual Studio, you will want the following:

image{width=”565” height=”109”}

and of course Xamarin:

image{width=”284” height=”84”}

You will probably want Azure capabilities as well:

image{width=”550” height=”84”}

 

When installing Visual Studio in Windows, there is a free Community Edition that fully support Xamarin app development, There is also the Professional and Enterprise versions of Visual Studio, So you may ask what is different, what can you do, or can’t do with the different versions of VS?

image{width=”1210” height=”602”}

Ref: https://www.visualstudio.com/vs/compare/

 

So you can do Xamarin app development with Community and Professional version of VS but 4 features are not available:

Embedded Assemblies

This is same as Bundle Assemblies into Native Code which means that when this option is enabled, assemblies are bundled into a native shared library. This option keeps your code safe; it protects managed assemblies by embedding them in native binaries. Ref: StackOverFlow

Xamarin Inspector

Visualize and debug your live app: The Inspector integrates with the app debugging workflow of your IDE, serving as a debugging or diagnostics aid when inspecting your running app. Ref: Xamarin Inspector on developer.xamarin.com

Xamarin Profiler

Xamarin uses Mono on IOS and Android for .NET runtime. Historically, Mono has featured a powerful command-line profiler for gathering information about programs running in the Mono runtime called the Mono log profiler. The Xamarin Profiler a graphical interface for the Mono log profiler, and supports profiling Android, iOS, and tvOS applications on Windows. Ref: Xamarin Profile on developer.xamarin.com

Remoted IOS Simulator for Windows

The remote iOS Simulator provides you with a way to test and debug iOS apps on the simulator entirely from Visual Studio on Windows. The Window displays on the VS Wiindows dev machine and can be interacted with there (eg touch).The built code ruins on the Mac (remotely) with the UI in the simulator  window.

Ref: Remoted iOS Simulator (for Windows)

 

The Development Environment

Initially these articles will focus upon Xamarin Forms app development targeting UWP. Android and IOS will come later. For UWP the dev machine can host the app for initial testing, use an emulator (WMO or desktop) on the desktop as well as a Windows phone.

 

Note that Android versions of the app  can be built and deployed from VS on  Windows. The target can be an Android device or an emulator running on the Windows device. The default emulator that is installed with the latest version of VS is  the Google Android Emulator. This requires a 64 bit system with Hardware Virtualisation to be enabled in the system’s BIOs  for efficiency but Hyper-V needs to be disabled. Also you need to select Intel Hardware Accelerated Execution Manager (HAXM) with the VS installation. The emulator as well as HAXM can be selected on the Individual Components tab of  the VS Installer, under Emulators. There is also the alternative Visual Studio Emulator for Android which was the default emulator for VS a year or so ago. It does require Hyper-V to be enabled. There are other Android emulators that can be installed and used for development .. later.

 

To target a Windows (eg WMO) or a Android device it needs to be setup for deployment, typically over USB.

 

With IOS, whilst you can build and deploy Xamarin apps to the simulator as windowed on the dev desktop as discussed above, deployment to an IOS device has to be from a Mac. Also to publish an app it has to be built on a Mac. But this can be actioned remotely from VS on a Windows device.

 

For the initial few articles in this series, we focus upon development on a Windows machine running VS and deploying a UWP app. Later on we will look at Android and possibly IOS deployments in more detail

 

Some Links