Bug 44162 - Xamarin Android fails to install in VS 2015
Summary: Xamarin Android fails to install in VS 2015
Status: RESOLVED DUPLICATE of bug 44300
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General (show other bugs)
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- blocker
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-09 22:48 UTC by valdetero
Modified: 2016-10-06 15:26 UTC (History)
6 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description valdetero 2016-09-09 22:48:01 UTC
# Steps to reproduce
Install Xamarin.VisualStudio_4.2.0.675.msi.
Launch Visual Studio that has an Android Project.
Android packages fail load.

I tried repairing, changing install, and uninstalling/restart/re-installing/restarting and it still errors.

# Expected behavior
Android should install.

# Actual behavior
Error message "the XamarinAndroidPackage package did not load correctly.

# Supplemental info (logs, images, videos)
ActivityLog.xml:
  <entry>
    <record>833</record>
    <time>2016/09/09 22:41:24.517</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>LegacySitePackage failed for package [XamarinAndroidPackage]Source: &apos;Xamarin.AndroidTools&apos; Description: Method not found: &apos;Void Mono.AndroidTools.AnalyticsService.ReportContextProperty(System.String[], System.String[])&apos;.&#x000D;&#x000A;System.MissingMethodException: Method not found: &apos;Void Mono.AndroidTools.AnalyticsService.ReportContextProperty(System.String[], System.String[])&apos;.&#x000D;&#x000A;   at Xamarin.AndroidTools.MonoDroidSdk.Refresh(String runtimePath, String binPath, String bclPath)&#x000D;&#x000A;   at Xamarin.AndroidTools.MonoDroidSdk.GetSdk()&#x000D;&#x000A;   at Xamarin.AndroidTools.AndroidSdk.&lt;&gt;c.&lt;GetInstalledPlatformVersions&gt;b__66_1(AndroidVersion version)&#x000D;&#x000A;   at System.Linq.Enumerable.&lt;&gt;c__DisplayClass6_0`1.&lt;CombinePredicates&gt;b__0(TSource x)&#x000D;&#x000A;   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()&#x000D;&#x000A;   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)&#x000D;&#x000A;   at Xamarin.VisualStudio.Android.Services.AndroidToolsSdk.CheckInstalledPlatformVersions() in C:\Users\builder\data\lanes\3513\c54ec37a\source\xamarinvs\src\Core\VisualStudio.Android\Services\AndroidToolsSdk.cs:line 374&#x000D;&#x000A;   at Xamarin.VisualStudio.Android.Services.AndroidToolsSdk.CheckAndroidSdkSettings() in C:\Users\builder\data\lanes\3513\c54ec37a\source\xamarinvs\src\Core\VisualStudio.Android\Services\AndroidToolsSdk.cs:line 367&#x000D;&#x000A;   at Xamarin.VisualStudio.Android.Services.AndroidToolsSdk.Start() in C:\Users\builder\data\lanes\3513\c54ec37a\source\xamarinvs\src\Core\VisualStudio.Android\Services\AndroidToolsSdk.cs:line 311&#x000D;&#x000A;   at Xamarin.VisualStudio.Android.XamarinAndroidPackage.Initialize() in C:\Users\builder\data\lanes\3513\c54ec37a\source\xamarinvs\src\Core\VisualStudio.Android\XamarinAndroidPackage.cs:line 134&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
    <hr>80131513</hr>
    <errorinfo></errorinfo>
  </entry>

# Test environment (full version information)
Windows 10
Visual Studio Enterprise 14.0.25425.01 Update 3
Xamarin.VisualStudio_4.2.0.675.msi (beta channel and standalone)
Comment 1 Brendan Zagaeski (Xamarin Support) 2016-09-11 22:31:46 UTC
I suspect this might be caused by one of the common issues Visual Studio can run into with updating extensions.

In particular, I suspect clearing the ComponentModelCache folder might help.  See step 3 on the following guide:

https://developer.xamarin.com/guides/cross-platform/getting_started/visual_studio_with_xamarin/troubleshooting/uninstall-xamarinvs/


And in case step 3 doesn't solve the issue, please try running through the other steps on that guide briefly too just to be thorough, and report back the results.  Thanks in advance!
Comment 2 valdetero 2016-09-12 14:48:37 UTC
That solved the issue! Thanks. I also downloaded this extension, that was mentioned, to resolve it in the future: https://visualstudiogallery.msdn.microsoft.com/22b94661-70c7-4a93-9ca3-8b6dd45f47cd.
Comment 3 valdetero 2016-09-12 14:49:59 UTC
It was an error with the Visual Studio MEF cache getting corrupted after switching to the Beta channel. Clearing cache solved issue.
Comment 4 Brendan Zagaeski (Xamarin Support) 2016-09-12 16:50:54 UTC
Excellent.  Glad that worked, and thanks for the verification!
Comment 5 Daniel Cazzulino 2016-09-30 13:48:46 UTC
Hi there!
 
I've put together a build on top of current stable (4.2.0.695) that should fix this issue: http://xvs.xamarin.com/patcheddrops/Xamarin.VisualStudio_4.2.0.698.msi

It will also be included in all future releases.

Please do reopen if you see this happen again in the future.

Thanks for reporting the issue!
Comment 6 John Miller [MSFT] 2016-10-06 14:45:32 UTC
@Daniel,

I installed the patch after I was getting this error and it did not stop it from happening. I deleted the component cache and then the solutions loads droids projects OK. Then I close and reopen VS and it won't load Android anymore with the same error as in the description in the ActivityLog
Comment 7 Brendan Zagaeski (Xamarin Support) 2016-10-06 15:12:26 UTC
@John the convention is that this bug would only be reopened by the _original reporter_ at this stage in the bug history because Comment 3 verified that the proposed fix worked for the original reporter.

It sounds like you might instead be hitting the secondary piece of Bug 44300 which involves the Test Recorder preview features.

Thanks!
Brendan
Comment 8 Brendan Zagaeski (Xamarin Support) 2016-10-06 15:18:02 UTC
In fact, since the error message in Comment 0 matches Bug 44300, I'll also mark this as a duplicate of that bug for bookkeeping.  Thanks!

*** This bug has been marked as a duplicate of bug 44300 ***
Comment 9 valdetero 2016-10-06 15:25:00 UTC
For the record, I still get this error all the time. I just constantly clear the component cache to fix it.

I pretty much use this extension a few times a week to get around this issue: https://visualstudiogallery.msdn.microsoft.com/22b94661-70c7-4a93-9ca3-8b6dd45f47cd.
Comment 10 Brendan Zagaeski (Xamarin Support) 2016-10-06 15:26:56 UTC
Ah perfect.  It sounds like it's definitely appropriate that this be marked as a duplicate of Bug 44300 then.  That bug describes how the problem kept coming back for the users on that bug until they installed the new build from Comment 5 and uninstalled Test Recorder (if installed).

In any case, thanks for the additional verification on the duplication status!

Note You need to log in before you can comment on or make changes to this bug.