无法在 Visual Studio 2013 中为 PCL 配置文件 158 安装包 MvvmCross.PortableSupport 3.2.1 [英] Could not install package MvvmCross.PortableSupport 3.2.1 at Visual Studio 2013 for PCL Profile 158

查看:28
本文介绍了无法在 Visual Studio 2013 中为 PCL 配置文件 158 安装包 MvvmCross.PortableSupport 3.2.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下设置,但仍然无法将 mvmcross 库添加到我的项目中:

I have the following setup and still couldn't add mvmcross libraries to my project:

  1. VS2013 更新 3
  2. Nuget 包管理器 2.8.50313.46
  3. PCL Profile 158(我也尝试过其他类似 78 等)

安装日志如下:

Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.2.1)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.MvvmCrossLibraries (≥ 3.2.1)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.2.1)'.
Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.2.1)'.
Installing 'MvvmCross.PortableSupport 3.2.1'.
Successfully installed 'MvvmCross.PortableSupport 3.2.1'.
Installing 'MvvmCross.HotTuna.CrossCore 3.2.1'.
Successfully installed 'MvvmCross.HotTuna.CrossCore 3.2.1'.
Installing 'MvvmCross.HotTuna.MvvmCrossLibraries 3.2.1'.
Successfully installed 'MvvmCross.HotTuna.MvvmCrossLibraries 3.2.1'.
Installing 'MvvmCross.HotTuna.StarterPack 3.2.1'.
Successfully installed 'MvvmCross.HotTuna.StarterPack 3.2.1'.
Installing 'MvvmCross 3.2.1'.
Successfully installed 'MvvmCross 3.2.1'.
Adding 'MvvmCross.PortableSupport 3.2.1' to ClassLibrary1.
Uninstalling 'MvvmCross.PortableSupport 3.2.1'.
Successfully uninstalled 'MvvmCross.PortableSupport 3.2.1'.
Install failed. Rolling back...
Could not install package 'MvvmCross.PortableSupport 3.2.1'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+Xamarin.iOS10+MonoAndroid10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

推荐答案

问题是Xamarin.iOS框架是iOS统一项目的新框架,NuGet 2.8.2没有将其视为可选框架(2.8.50313.46) 或更早版本将可移植类库 (PCL) 程序集安装到 PCL 项目中.NuGet 2.8.2 将 MonoAndroid 和 MonoTouch 视为可选,而不是 Xamarin.iOS.

The problem is that the Xamarin.iOS framework, which is a new framework for iOS Unified projects, is not treated as an optional framework by NuGet 2.8.2 (2.8.50313.46) or older when installing a Portable Class Library (PCL) assembly into a PCL project. NuGet 2.8.2 treats MonoAndroid and MonoTouch as optional but not Xamarin.iOS.

所以你的选择是以下之一:

So your options are one of the following:

  1. 安装 NuGet 2.8.3 alpha.
  2. 删除新的 Xamarin.iOS PCL 配置文件 xml 文件 (Xamarin.iOS.Unified.xml).

NuGet 2.8.3 alpha 已修改,因此它可以识别 Xamarin.iOS 框架并将其视为可选.

NuGet 2.8.3 alpha has been modified so it is aware of the Xamarin.iOS framework and treats it as optional.

新的 Xamarin.iOS PCL 配置文件 xml 文件由较旧的 Xamarin 3.6 版本之一安装.最新的 Xamarin 3.6 版本不安装新的 iOS 统一 PCL 配置文件 xml 文件,并且需要 第二个安装程序 安装 NuGet 2.8.3 alpha 和新的配置文件 xml 文件.

The new Xamarin.iOS PCL profile xml files were installed by one of the older Xamarin 3.6 releases. The latest Xamarin 3.6 release does not install the new iOS unified PCL profile xml files and requires a second installer which installs NuGet 2.8.3 alpha and the new profile xml files.

如果您选择选项 2),请注意这样做会阻止将 NuGet 包(例如 MvvmCross.PortableSupport)安装到 Xamarin.iOS 统一项目中.

If you go for option 2) please be aware that doing so will prevent the installation of NuGet packages, such as MvvmCross.PortableSupport into a Xamarin.iOS Unified project.

这篇关于无法在 Visual Studio 2013 中为 PCL 配置文件 158 安装包 MvvmCross.PortableSupport 3.2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆