xamarin.forms can't build FIRST project in visual studio 2015

时间:2016-08-31 17:30:58

标签: xamarin.forms visual-studio-2015

=========================================

UPDATE: This is answered in my post below.

=========================================

Scenario:

  1. Fresh Windows 10 installation with updates.
  2. Installed Visual Studio 2015 with Xamarin development features.
  3. Updated Xamarin in Tools, Options, Xamarin, Check Updates...
  4. Checked to make sure Android SDKs are installed.
  5. Set Droid project to build & deploy in config manager as well as the Portable library (build only).
  6. Build just hangs..................

Tried other suggestions:

  1. Delete obj, bin, and Xamarin zip folders...restart, clean, rebuild.

  2. Updating Xamarin.Forms to version v2.3.1.114 (tried 2.2 first). Then updating Xamarin.Android.* to versions v23.3.0 (tried version with 2.2. first)

  3. Linking Xamarin.Android .dlls manually.

  4. Downloading android_m2repository_r29.zip or other zips as suggested in other posts and extracting manually to Xamarin folders.

  5. Deleted .vs folder and rebuilt

  6. Deleted temp and Xamarin folders in app data folder.

Xamarin Error Log

Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-08-31 14:37:37.5635] An error occurred searching types for the given assembly System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.MetadataReader.IMetadataTables'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D8F579AB-402D-4B8E-82D9-5D63B1065C68}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

So nothing works...Why can't I build this project? It just hangs every time.

2 个答案:

答案 0 :(得分:0)

好的尝试安装此模拟器,我不使用通用这是更好的

https://developer.xamarin.com/releases/android/android-player/

当你安装donwload一个设备并验证你下载与你下载的设备相对应的SDK时。

使用此仿真器再次编译

让我知道解决你的问题。

答案 1 :(得分:0)

更新:构建需要一整天,但它会完成。

修复说明:

您可以转到此路径:C:\ Users \\ AppData \ Local \ Xamarin \

然后删除这些子文件夹中的所有版本化文件夹(例如23.0.0):

  1. Xamarin.Android.Support.Animated.Vector.Drawable

  2. Xamarin.Android.Support.Design

  3. Xamarin.Android.Support.v4

  4. Xamarin.Android.Support.v7.AppCompat

  5. Xamarin.Android.Support.v7.CardView

  6. Xamarin.Android.Support.v7.MediaRouter

  7. Xamarin.Android.Support.v7.RecyclerView

  8. Xamarin.Android.Support.Vector.Drawable

  9. 现在重建但重建时,Visual Studio 2015将下载大量文件以使构建工作。 您可能需要15-60分钟才能等待全部重新下载,并且Visual Studio中没有消息正在下载文件。您必须已经知道您应该等待要下载的所有文件。 (我只关注每个文件夹,并观看Visual Studio自动创建的新文件夹)。

    完成后,构建将起作用,您可以运行项目。

    希望这可以帮助遇到类似问题的其他人。如果它帮助您发表评论并让我知道!