If you are a current user of Visual Studio 2013 and Xamarin, and you are wanting to start playing around with the new features in Visual Studio 2015 Preview, including the new Android emulator, then this post is for you. I spent most of my morning trying to get this to work, so I will save you the troubles that I went through and just tell you what you need to do. This should make your life so much easier.
First, you need to install Visual Studio 2015 Preview. Well, that was easy.
Next you need to uninstall everything Xamarin that you have. I know it’s a pain, but trust me, this will save you time and frustration going forward.
Now, open up Visual Studio 2015 Preview, and create a new Android project.
When the project is created, you will see a document with instructions on how to download Xamarin.
Do what the form says and click the “Download Xamarin” button. When you click on that link it will take you to a page to download the actual Xamarin installer for Visual Studio 2015.
Once you fill out the form, click the download button of your choice and save or run the “XamarinInstaller-VS2015.exe” file. I personally like to save them before I run them, but that’s just me.
Once you have completed the Xamarin install, launch Visual Studio 2015 again, and you will notice you have some new Project Templates.
As you can see, I am running the Business edition of Xamarin, since I have Xamarin Forms available to me. Hit okay, and let the magic begin. Within a few seconds you will have a number of projects in your solution explorer that you can use to start writing cross-platform apps.
Let’s get that Android Emulator Working
The next thing we want to do is get that cool new Android emulator working that ships with Visual Studio 2015 Preview. Start by making the Android project your start up project. This will give you some new options in your Debug toolbar. The main one being the new Android Phone emulator.
Let’s go ahead and hit F5 to start debugging out Android app, and see what happens.
Well, crap! That sucks. Looks like Xamarin didn’t want to shake hands with Visual Studio 2015. Or is that the other way around? Anyways, not a big deal. This is a known issue and has an easy fix. Simply right-click on the Android project and click Project -> Properties -> Android Options –> and uncheck “Use Fast Deployment (debug mode only)”.
Now, hit F5 one more time and let’s see what happens.
SUCCESS! We are now up and running with Visual Studio 2015 Preview and Xamarin.
Don’t Upgrade Visual Studio 2013 Xamarin.iOS
Now that you have everything working nicely inside Visual Studio 2015 Preview, you may think that there is nothing else you have to worry about. Right? Well, not so fast. Eventually, you will have to work inside Visual Studio 2013 again. If you do, you will get prompted to upgrade your version of Xamarin.iOS.
DO NOT UPDATE!
If you perform this update, you will completely break your Visual Studio 2015 Preview Xamarin setup. If you do wind up doing this, which you shouldn’t because I just told you not to, you will have to basically uninstall everything Xamarin and install it all over again.
I hope you find this post helpful, and maybe it even saved you some time and a little pain relief. As always, feel free contact me on my blog, connect with me on Twitter (@brianlagunas), or leave a comment below for any questions or comments you may have.