How to Configure Xamarin PCL Support on Windows

Although official Xamarin documentation could make you believe that Visual Studio is required for PCL support, in reality it is absolutely not. For those who prefer Xamarin Studio as a development tool, all the necessary components can be obtained from compact installers so there is no need to download and install the free Visual Studio Express edition, if not for other purposes of course.

Detailed steps of the installation are as follows:

1) Easiest is to start with the manual installation procedure for Xamarin.Android as per the instructions on the Xamarin website.

Proceed up until step 4. It is important to note here that a common source of error is that more than one version of Android SDK Build-tools gets installed if you use the Xamarin Universal Installer after installing the Android SDK manually. Due to this bug we recommend the clean and transparent manual installation procedure over the automated one. Make sure you have the latest and only the latest version of Android SDK Tools / Android SDK Platform-tools / Android SDK Build-tools on your build machine. Delete any other versions from Android SDK Manager if necessary.

2) Download Microsoft Portable Library Tools 2 for Visual Studio 2010 and run the installer from the Command Prompt with the ‘/buildmachine’ switch:

C:\>PortableLibraryTools.exe /buildmachine

The command line switch will let you install the tools without a copy of Visual Studio.

3) Download and install the Microsoft .NET Portable Library Reference Assemblies 4.6 package. Now go into ‘C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6\’ and extract the ‘PortableReferenceAssemblies.zip’ archive into assemblies directory ‘C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\’.

4) Log in to you Xamarin account, go to ‘Downloads’ and download the latest version of the all-in-one Xamarin.Android+Xamarin Studio+Visual Studio extensions installer (but NOT! the Universal Installer). To do this you have to click ‘View all versions’ under the big download button, select ‘Windows’ then ‘x.y.z – Latest version (release date)’. Finally, run the installer and hopefully you’re done.

By now you should be able to load and build PCL projects. For starters create a blank app with Xamarin.Forms Portable (found under C#/Mobile Apps/Blank App (Xamarin.Forms Portable)), build it then run it on the emulator.

There’s an ongoing forum discussion on the related issues in the Xamarin forums.

This entry was posted in App. Bookmark the permalink.

Comments are closed.