Xamarin: adding Android components with problems

Working on a Xamarin project, I have added a component but I had some problem: the component was downloaded, but the dll was not referenced in the project.

I have found the explanations of the guide Walkthrough: Including a Component in your project, but it must be something simple because I add the component inside Visual Studio 2015.

Then I've found the help Quick work around for unresolved Xamarin components in Visual Studio, and I thought that this could be the case, but the files were already on the disc so the issue was not about the path length.

In the end the component was badly downloaded on the first instance, and I had to:

  • remove the components from my project
  • remove the NuGet packages related to the components from my project (founding this took me really a lot of time...)
  • clear the Components folder at the solution level
  • clear the Packages folder at the solution level

VS2015 Android emulator: multiple issues

Visual Studio 2015 introduces the new Android emulator. What is great is that it is based on Hyper-V technology, so hardware virtualization, as described more extensively in Introducing Visual Studio‚Äôs Emulator for Android.

Using it to develop Xamarin application, I've run into some issues, and I think that it would be good to collect them here:

  • first of all, during my first attempt to run it to debug a simple application, I got in the Output windows of Visual Studio this cryptic error:
         In mgmain JNI_OnLoad
    Couldn't connect to logcat, GetProcessId returned: 0
    As described in 
    Can't run app on Visual Studio 2015 emulator (DWP Handshake failed), the solution is to go to the Android project settings and in the Android Options tab, disable Fast Deployment
  • the second problem was that because of my naming convention for demo projects, I had a too long project name.
    Doing some attempts, I've verified that the longest project name you can give is 37 characters (more create problems with the deployment);
  • when I've been finally able to run my application, I've noticed that I had multiple graphic issues (even if the application is really basic).
    As described in Visual studio android emulator will not start fully, you have to go to the folder C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\SKUs\Android, edit the file xdesku.xml and delete/comment the line: