Bug 44532 - Cannot create Android project of Xamarin.Forms
Summary: Cannot create Android project of Xamarin.Forms
Status: CLOSED UPSTREAM
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Xamarin.Forms ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-20 17:43 UTC by Vulcan
Modified: 2016-09-21 16:04 UTC (History)
6 users (show)

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


Attachments
ActivityLog.xml (70.36 KB, text/xml)
2016-09-20 17:43 UTC, Vulcan
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED UPSTREAM

Description Vulcan 2016-09-20 17:43:32 UTC
Created attachment 17616 [details]
ActivityLog.xml

When I create Xamarin.Forms prject by [File] > [New] > [Project] > [Cross-Platform] > [Blank Xaml App (Xamarin.Forms Portable) and got following error message.

http://xamarindoggy.azurewebsites.net/Content/CannotLoadXamarinAndroidPackage.png

I also find my C:\Users\%username%\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml, get some error log message ( I have already uploaded my ActivityLog.xml) .

How can I solve this problem?

  <entry>
    <record>883</record>
    <time>2016/09/20 17:30:34.193</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>LegacySitePackage failed for package [XamarinAndroidPackage]Source: &apos;Xamarin.AndroidTools&apos; Description: &#x627E;&#x4E0D;&#x5230;&#x65B9;&#x6CD5;: &apos;Void Mono.AndroidTools.AnalyticsService.ReportContextProperty(System.String[], System.String[])&apos;&#x3002;&#x000D;&#x000A;System.MissingMethodException: &#x627E;&#x4E0D;&#x5230;&#x65B9;&#x6CD5;: &apos;Void Mono.AndroidTools.AnalyticsService.ReportContextProperty(System.String[], System.String[])&apos;&#x3002;&#x000D;&#x000A;   &#x65BC; Xamarin.AndroidTools.MonoDroidSdk.Refresh(String runtimePath, String binPath, String bclPath)&#x000D;&#x000A;   &#x65BC; Xamarin.AndroidTools.MonoDroidSdk.GetSdk()&#x000D;&#x000A;   &#x65BC; Xamarin.AndroidTools.AndroidSdk.&lt;&gt;c.&lt;GetInstalledPlatformVersions&gt;b__66_1(AndroidVersion version)&#x000D;&#x000A;   &#x65BC; System.Linq.Enumerable.&lt;&gt;c__DisplayClass6_0`1.&lt;CombinePredicates&gt;b__0(TSource x)&#x000D;&#x000A;   &#x65BC; System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()&#x000D;&#x000A;   &#x65BC; System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)&#x000D;&#x000A;   &#x65BC; Xamarin.VisualStudio.Android.Services.AndroidToolsSdk.CheckInstalledPlatformVersions() &#x65BC; C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Services\AndroidToolsSdk.cs: &#x884C; 374&#x000D;&#x000A;   &#x65BC; Xamarin.VisualStudio.Android.Services.AndroidToolsSdk.CheckAndroidSdkSettings() &#x65BC; C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Services\AndroidToolsSdk.cs: &#x884C; 367&#x000D;&#x000A;   &#x65BC; Xamarin.VisualStudio.Android.Services.AndroidToolsSdk.Start() &#x65BC; C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Services\AndroidToolsSdk.cs: &#x884C; 311&#x000D;&#x000A;   &#x65BC; Xamarin.VisualStudio.Android.XamarinAndroidPackage.Initialize() &#x65BC; C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\XamarinAndroidPackage.cs: &#x884C; 134&#x000D;&#x000A;   &#x65BC; 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>
  <entry>
    <record>884</record>
    <time>2016/09/20 17:30:34.205</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [XamarinAndroidPackage](null)</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
    <hr>80131513</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>885</record>
    <time>2016/09/20 17:30:34.696</time>
    <type>Error</type>
    <source>SccDisplayInformation.SolutionOptions</source>
    <description>Unable to load solution user option &apos;SccProvider.Solution.LoadCount&apos;</description>
  </entry>
Comment 2 Vulcan 2016-09-20 18:21:46 UTC
My Visual Stdio 2015 system information:

Microsoft Visual Studio Enterprise 2015
版本 14.0.25431.01 Update 3
Microsoft .NET Framework
版本 4.6.01586

安裝的版本: Enterprise

Architecture and Modeling Tools   00322-90150-00559-AA728
Microsoft Architecture and Modeling Tools
    
UML(R) 和 Unified Modeling Language™ 是 Object Management Group, Inc. 在美國及其他國家的商標或註冊商標。

LightSwitch for Visual Studio 2015   00322-90150-00559-AA728
Microsoft LightSwitch for Visual Studio 2015

Microsoft Visual Studio Tools for Applications 2015   00322-90150-00559-AA728
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-90150-00559-AA728
Microsoft Visual Basic 2015

Visual C# 2015   00322-90150-00559-AA728
Microsoft Visual C# 2015

Visual C++ 2015   00322-90150-00559-AA728
Microsoft Visual C++ 2015

Visual F# 2015   00322-90150-00559-AA728
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - CHT   00322-90150-00559-AA728
Windows Phone SDK 8.0 - CHT

Application Insights Tools for Visual Studio 套件   7.6.00907.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20907.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9.5   14.0.20810.0
Azure App Service Tools v2.9.5

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.1.0000.0
Microsoft Azure Data Lake Tools for Visual Studio

Clang with Microsoft CodeGen   14.0.25515
Clang with Microsoft CodeGen

Clear MEF Component Cache   1.3.1
Clears the Visual Studio MEF component cache to fix issues with cache corruption.

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
提供 Azure 行動服務和 Microsoft Azure Tools 所使用的通用服務。

ConfigurationTransform   1.3
Automatically transform app.config during build process. Once the transformation is set, it will run on other build machines without the extension.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript 專案系統   2.0
JavaScript 專案系統

JavaScript 語言服務   2.0
JavaScript 語言服務

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft .NET Core Tools (Preview 2)   14.1.20907.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Hive Query Language Service   2.1.0000.0
Language service for Hive query

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40715.2

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

NuGet 封裝管理員   3.5.0
Visual Studio 中的 NuGet 套件管理員。如需 NuGet 的詳細資訊,請造訪 http://docs.nuget.org/。

Office Developer Tools for Visual Studio 2015 ENU   14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU

OptionsPackage Extension   1.0
OptionsPackage Visual Studio Extension Detailed Info

PreEmptive Analytics 視覺化檢視   1.2
視覺化 PreEmptive Analytics 產品中彙總摘要的 Microsoft Visual Studio 副檔名。

Python Tools for Visual Studio   2.2.40623.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.40623.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.40623.00
Profiling support for Python projects.

Snippet Designer   1.6.2
Snippet Designer is a Visual Studio plug in which allows you to create and search for snippets inside the IDE

SQL Server Analysis Services   13.0.1605.88
Microsoft SQL Server Analysis Services Designer 
版本 13.0.1605.88

SQL Server Data Tools   14.0.60629.0
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services 設計師
版本 13.0.1601.5

SQL Server Reporting Services   13.0.1605.88
Microsoft SQL Server Reporting Services 設計師 
版本 13.0.1605.88

SyncfusionAssemblyReference   1.0
Information about my package

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
Visual Studio 專用的 TypeScript 工具

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Workflow Manager Tools 1.0   1.0
這個套件包含 Workflow Manager 的必要 Visual Studio 整合元件。

Xamarin   4.2.0.680 (c4382f5)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.0.18 (0e59c36)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.0.6 (6c3fee4)
Visual Studio extension to enable development for Xamarin.iOS.

XAML Spy   2.10.0
XAML Spy for Visual Studio
Copyright © First Floor Software. All rights reserved.

Spy all the XAML!
http://xamlspy.com

多語應用程式工具組   4.0.1795.0
多語言應用程式工具組可以説明您通過提供檔案管理、 偽和機器翻譯,翻譯編輯器中,定位您的 Windows 應用商店應用程式和構建集成。HTTP://aka.ms/matinstall

適用於跨平台行動裝置開發的 Visual C++ (Android)   14.0.25401.00
適用於跨平台行動裝置開發的 Visual C++ (Android)
Comment 3 Ben Beckley 2016-09-20 20:05:13 UTC
Hi Vulcan,

Please delete the contents your ComponentModelCache folder located at
>C:\Users\<USER>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

This is an upstream issue in Visual Studio that affects packages not loading. I will mark this as upstream, but if the problem is not fixed then please reopen the bug.

Thank you.
Comment 4 Vulcan 2016-09-21 05:02:32 UTC
I find if I open visual studio 2015 (Update3) and then click menu [Tools] > [Options] > [Xamarin] and see as following dialog capture. I can create Xamarin.Forms prject by [File] > [New] > [Project] > [Cross-Platform] > [Blank Xaml App (Xamarin.Forms Portable).

http://xamarindoggy.azurewebsites.net/Content/VS2015OptionsXamarin.png

But if I open visual studio 2015 (Update3), wait 1~5 minutes,  and can create Xamarin.Forms prject by [File] > [New] > [Project] > [Cross-Platform] > [Blank Xaml App (Xamarin.Forms Portable), the following error dialog will appear.

https://15254b2dcaab7f5478ab-24461f391e20b7336331d5789078af53.ssl.cf1.rackcdn.com/xamarin.vanillaforums.com/FileUpload/a6/45085ea6c3514889e36c42dd970318.jpg
Comment 5 Vulcan 2016-09-21 05:44:12 UTC
if I open visual studio 2015 (Update3), wait 1~5 minutes,  and can create Xamarin.Forms prject by [File] > [New] > [Project] > [Cross-Platform] > [Blank Xaml App (Xamarin.Forms Portable), the following error dialog will appear.

https://15254b2dcaab7f5478ab-24461f391e20b7336331d5789078af53.ssl.cf1.rackcdn.com/xamarin.vanillaforums.com/FileUpload/a6/45085ea6c3514889e36c42dd970318.jpg

And I click menu [Tools] > [Options] > [Xamarin] and see as following dialog capture.

http://xamarindoggy.azurewebsites.net/Content/Error%20occurred%20while%20loading%20this%20property%20page.png
Comment 6 Vulcan 2016-09-21 16:04:20 UTC
I found root cause is Xamarin Test Recorder. 

I just remove Xamarin Test Recorder and downgrade to Xamarin.VisualStudio_4.1.2.18, then upgrade to Xamarin.VisualStudio_4.2.0.680. Then I create Xamarin.Forms project , no any error occur.

https://store.xamarin.com/account/my/subscription/downloads