Xamarin 包安装错误

标签 xamarin xamarin.forms

在 Visual Studio 2015 中创建新的 Blank Xamarin.Form Portable 项目时,出现“包安装错误”...

Could not add all the required pacakges to the project. The following packages failed to install from C:....Xamarin\4.0.3.214\Packages:

Xamarin.Form.2.0.0.6482: Could not install package Xamarin.Form.2.0.0.6482.

You are trying to install this package into a project that targets .NETFramework,Version=v4.0


enter image description here

最佳答案

看起来您可能需要正确设置 PCL 的配置文件。
这些是我在创建新的 Xam.Forms 应用程序时获得的选项:
enter image description here
从这里 question他们设置了这样的配置文件:

I had a similar issue using Visual Studio and I've found that the following combination in the PCL works:

  • .NET Framework 4.5
  • Windows Phone Silverlight 8
  • Xamarin.Android
  • Xamarin.iOS

关于Xamarin 包安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37005784/

相关文章:

c# - 使用命令在加载页面 (Xamarin.Forms) 时填充 ListView

c# - 使用 SmsManager 打开默认的短信应用

xaml - Xamarin Dim 页面(主详细信息页面)

c# - 如何让 Label 显示带有不同颜色字母的 FormattedString?

c# - 将相对源根父控件的属性绑定(bind)到子类的附加属性 - 使应用程序崩溃

c# - 我是否需要 iOS 或 Android 设备才能使用 Visual Studio 和 Xamarin 编写应用程序

c# - 无法在 Xamarin.Forms 中实现导航

android - MvvmCross 将 bool 转换为 Android 中的 drawable

c# - Xamarin 表单 System.Reflection.TargetInitationException : 'Exception has been thrown by the target of an invocation.'

xamarin - 如何检查 xamarin 表单的 UI