Set up And Install Xamarin In Visual Studio

 

Xamarin is a Microsoft-owned San Francisco-based software company founded in May 2011 by the engineers that created Mono, Xamarin.Android (formerly Mono for Android) and Xamarin.iOS (formerly MonoTouch), which are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET).

With a C#-shared codebase, developers can use Xamarin tools to write native android, iOS, and Windows apps with native user interfaces and share code across multiple platforms, including Windows and macOS. 

Setting up Xamarin Project

  • Start by creating a new Xamarin.Forms project.
  • Open Visual Studio and create a new Xamarin.Forms application.
  • Goto File > New Project > Visual C# > Cross Platform > Black App
  • Then select PCL(Portable Class Library).
  • Now Xamarin project is ready to run.

Pairing windows with a Mac host

  • On a Windows machine, install Visual Studio 2017
  • On a Mac, install Xcode and Visual Studio for Mac
  • Enable remote login on the Mac .
  • On the Mac, open System Preferences and go to the Sharing
  • Check Remote Login the Service
  • Make sure that it is configured to allow access for All users
  • Now that remote login is enabled, connect Visual Studio 2017 to the Mac.

 

  • Connect to the Mac from Visual Studio 2017
  • In Visual Studio 2017, open an existing iOS project or create a new one by choosing File > New > Project and then selecting an iOS project template.
  • Open the Pair to Mac dialog, Use the Pair to Mac button iOS toolbar.

  • Select a Mac in the list. Click Connect.

  • Enter your username and password.
    • The first time you connect to any particular Mac, you are prompted to enter your username and password for that machine:
    • Pair to Mac uses these credentials to create a new SSH connection to the Mac. If it succeeds, a key is added to the authorized_keys file on the Mac. Subsequent connections to the same Mac will login automatically.

 

  • Pair to Mac automatically configures the Mac.
  • When Visual Studio 2017 is connected to a Mac, that Mac’s item in the Pair to Mac dialog displays an icon indicating that it is currently connected:

If you have successfully paired to a Mac build host, you are ready to build Xamarin.iOS apps in Visual Studio 2017.