Xamarin.Android troubles following install of Xamarin 4.7.10 on Visual Studio 2015

AlexanderMelchersAlexanderMelchers NLMember ✭✭
edited October 2017 in Xamarin.Android

Hi all,

I'm running into trouble with my Xamarin.Android installation after having upgraded my Xamarin version to 4.7.10 on Visual Studio 2015 (Update 3), Windows 10 (though 4.7.9 works fine). What happens initially, it that Visual Studio starts up fine, though a little slower than normal, following which I receive a pop-up with a warning message as follows:

The 'XamarinAndroidPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\MyWinId\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.

Checking the activity log gets me the below as the most likely culprit:

LegacySitePackage failed for package [XamarinAndroidPackage]
Source: 'System.ComponentModel.Composition'
Description: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) Object reference not set to an instance of an object.
Resulting in: An exception occurred while trying to create an instance of type 'Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider'.
Resulting in: Cannot activate part 'Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider'.
Element: Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider --> Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot get export 'Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider (ContractName="Xamarin.VisualStudio.Android.IAndroidVirtualDeviceProvider")' from part 'Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider'.
Element: Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider (ContractName="Xamarin.VisualStudio.Android.IAndroidVirtualDeviceProvider") --> Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot set import 'Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider..ctor (Parameter="virtualDeviceProviders", ContractName="Xamarin.VisualStudio.Android.IAndroidVirtualDeviceProvider")' on part 'Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider'.
Element: Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider..ctor (Parameter="virtualDeviceProviders", ContractName="Xamarin.VisualStudio.Android.IAndroidVirtualDeviceProvider") --> Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot get export 'Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider (ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceProvider")' from part 'Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider'.
Element: Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider (ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceProvider") --> Xamarin.VisualStudio.Android.MonoAndroidDeviceProvider --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot set import 'Xamarin.VisualStudio.Android.MonoAndroidDeviceManager..ctor (Parameter="deviceProvider", ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceProvider")' on part 'Xamarin.VisualStudio.Android.MonoAndroidDeviceManager'.
Element: Xamarin.VisualStudio.Android.MonoAndroidDeviceManager..ctor (Parameter="deviceProvider", ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceProvider") --> Xamarin.VisualStudio.Android.MonoAndroidDeviceManager --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot get export 'Xamarin.VisualStudio.Android.MonoAndroidDeviceManager (ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceManager")' from part 'Xamarin.VisualStudio.Android.MonoAndroidDeviceManager'.
Element: Xamarin.VisualStudio.Android.MonoAndroidDeviceManager (ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceManager") --> Xamarin.VisualStudio.Android.MonoAndroidDeviceManager --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot set import 'Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging..ctor (Parameter="deviceManager", ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceManager")' on part 'Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging'.
Element: Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging..ctor (Parameter="deviceManager", ContractName="Xamarin.VisualStudio.Android.IMonoAndroidDeviceManager") --> Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').
Resulting in: Cannot get export 'Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging (ContractName="Clide.Commands.ICommandExtension")' from part 'Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging'.
Element: Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging (ContractName="Clide.Commands.ICommandExtension") --> Xamarin.VisualStudio.Android.Commands.ShowDeviceLogging --> ComponentCatalog (Types='Clide.ErrorsManager, Clide.HostImpl, ...').

This being the case, I've since turned off the Live Player from the Xamarin-settings under Tools->Options, which seems to have resolved the warning message. However, the next issue I got was an error stating that

Xamarin.Android for Visual Studio requires Android SDK. Please install it or set Android SDK path on Tools->Options->Xamarin->Android Settings menu.

Multiple versions of the SDK are installed on my system, and the paths to the SDKs is correctly configured in the above settings menu. Interestingly, the error no longer appears after restarting Visual Studio, but now Visual Studio no longer recognizes my real Samsung Galaxy S5, which I use for debugging purposes (as an aside, I also seem to have difficulties loading iOS-projects too).

At the same time, the current update seems to enable Android SDK 8 (Oreo) in my project properties, which is what I was hoping to find... Still, with these problems I cannot continue development on our Xamarin.Forms-project, which is very unfortunate. Luckily, I've already found a work-around, which is downgrade to the last working version of Xamarin, but this is far from ideal either.

Since the Live Player is a feature of Visual Studio 2017, does anybody know whether Xamarin 4.7 is supposed to be able to run on Visual Studio 2015 (I couldn't find any reference)? If so, is there anything I need to do to make it work?

Thanks in advance for your help!

Best regards,
Alexander.

P.S.: I've also filed this as a bug report on Bugzilla.

Posts

  • So, the fact that my Samsung test device did not turn up in Visual Studio as a target device might have had to do with some HTC development/USB drivers that I had de-installed before, as the problem also occurred following a downgrade to the last-known-good version of Xamarin (4.7.9), but subsequently disappeared following a reboot. Because of this, I retried installing Xamarin 4.7.10, but never get far enough to actually test whether I could debug an Android application, as loading the solution freezes Visual Studio. With this respect it might be interesting to note that I'm using Resharper as an extension.

  • Thanks to advice from @JimmyGarrido on the bug report, I now know that you can prevent Xamarin 4.7.10 from freezing while loading a Forms-project by deleting the solution's .vs-folder. However, (at least for me) this is something you need to do each and every time you open the solution, making it a rather impractical workaround. In addition, I feel like project-files are being loaded less rapidly, and have seen one of two open Visual Studio instances go black (and freeze) as though suffering from a memory issue. To top it off, you will also need to delete the .vs-folder the first time you open a solution again after reverting back to Xamarin 4.7.9.

    Anybody have any other ideas on what to try?

  • AlexanderMelchersAlexanderMelchers NLMember ✭✭

    For me, the eventual solution to the problem was to go with the flow and get onto the VS2017 band-wagon :smile: Things for like a charm for me now...

Sign In or Register to comment.