MvvMCross 3.0.6 Nuget 包安装问题 [英] MvvMCross 3.0.6 Nuget package installation issue

查看:30
本文介绍了MvvMCross 3.0.6 Nuget 包安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 NuGet 2.5 版本安装 MVVMCross NuGet 包.我已将单声道 android 和 touch 文件添加到 Profile104 文件夹.我仍然收到以下异常:

正在尝试解决依赖 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'.正在尝试解决依赖项MvvmCross.HotTuna.CrossCore (≥ 3.0.6)".正在尝试解决依赖项MvvmCross.PortableSupport (≥ 3.0.6)".安装MvvmCross.PortableSupport 3.0.6".成功安装MvvmCross.PortableSupport 3.0.6".安装MvvmCross.HotTuna.CrossCore 3.0.6".成功安装MvvmCross.HotTuna.CrossCore 3.0.6".安装MvvmCross.HotTuna.StarterPack 3.0.6".成功安装MvvmCross.HotTuna.StarterPack 3.0.6".安装MvvmCross 3.0.6".成功安装MvvmCross 3.0.6".将MvvmCross.PortableSupport 3.0.6"添加到 PortableClassLibrary1.卸载MvvmCross.PortableSupport 3.0.6".成功卸载MvvmCross.PortableSupport 3.0.6".安装失败.滚回来...无法安装软件包MvvmCross.PortableSupport 3.0.6".

<块引用>

您正在尝试将此软件包安装到一个针对目标的项目中'portable-win+net45+MonoAndroid16+MonoTouch40+sl40+wp',但是包不包含任何程序集引用或内容文件与该框架兼容.如需更多信息,请联系包作者.

我在创建新的 PCL 库项目时选择了以下选项

以下是 C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETPortablev4.0ProfileProfile104SupportedFrameworks 文件夹中 xml 文件的内容

.NET for Windows Store apps.xml

<?xml version="1.0" encoding="utf-8"?><框架标识符=".NETCore"个人资料="*"最低版本=4.5"DisplayName=".NET for Windows Store 应用程序"MinimumVersionDisplayName=""/>

.NET Framework 4.5

<?xml version="1.0" encoding="utf-8"?><框架标识符=".NETFramework"个人资料="*"最低版本=4.5"DisplayName=".NET 框架"MinimumVersionDisplayName="4.5"/>

MonoAndroid.xml

<?xml version="1.0" encoding="utf-8"?><Framework DisplayName="Mono for Android"标识符="MonoAndroid"个人资料="*"最低版本=1.6"最大版本=*"/>

MonoTouch.xml

<?xml version="1.0" encoding="utf-8"?><框架DisplayName="MonoTouch"标识符="MonoTouch"个人资料="*"最大版本=*"最低版本=4.0"/>

Silverlight 4.xml

<?xml version="1.0" encoding="utf-8"?><框架标识符="银光"配置文件=""最低版本=4.0"DisplayName="银光"MinimumVersionDisplayName="4"/>

VSMonoTouch.xml

<?xml version="1.0" encoding="utf-8"?>

Windows Phone 7.5.xml

<?xml version="1.0" encoding="utf-8"?><框架标识符="银光"配置文件="WindowsPhone7*"最低版本=4.0"DisplayName="Windows 手机"MinimumVersionDisplayName="7.5"/>

我在 Windows Server 2012 64 位版本上使用 Visual Studio 2012 Ultimate Update 2.有人能指出我正确的方向吗?

解决方案

看起来您的可移植类库中的目标是 Windows Phone 7.0.尝试切换到 Windows Phone 7.5 看看是否有帮助.如果没有,请尝试发布 PCL选择目标"屏幕的屏幕截图,以及您添加到SupportedFrameworks"文件夹中的所有 XML 文件的内容.

<小时>

尝试删除 VSMonoTouch.xml(然后重新启动 Visual Studio).

I am trying to install MVVMCross NuGet package using NuGet 2.5 version. I have added the mono android and touch file to Profile104 folder. Still I am getting following exception:

Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.6)'.
Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.6)'.
Installing 'MvvmCross.PortableSupport 3.0.6'.
Successfully installed 'MvvmCross.PortableSupport 3.0.6'.
Installing 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Installing 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Installing 'MvvmCross 3.0.6'.
Successfully installed 'MvvmCross 3.0.6'.
Adding 'MvvmCross.PortableSupport 3.0.6' to PortableClassLibrary1.
Uninstalling 'MvvmCross.PortableSupport 3.0.6'.
Successfully uninstalled 'MvvmCross.PortableSupport 3.0.6'.
Install failed. Rolling back...
Could not install package 'MvvmCross.PortableSupport 3.0.6'. 

You are trying to install this package into a project that targets 'portable-win+net45+MonoAndroid16+MonoTouch40+sl40+wp', 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.

I have selected following option when creating a new PCL Library project

Following are the content for the xml files from C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETPortablev4.0ProfileProfile104SupportedFrameworks folder

.NET for Windows Store apps.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier=".NETCore"
    Profile="*"
    MinimumVersion="4.5"
    DisplayName=".NET for Windows Store apps"
    MinimumVersionDisplayName="" />

.NET Framework 4.5

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier=".NETFramework"
    Profile="*"
    MinimumVersion="4.5"
    DisplayName=".NET Framework"
    MinimumVersionDisplayName="4.5" />

MonoAndroid.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework DisplayName="Mono for Android"
  Identifier="MonoAndroid"
  Profile="*"
  MinimumVersion="1.6"
  MaximumVersion="*" />

MonoTouch.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    DisplayName="MonoTouch"
    Identifier="MonoTouch"
    Profile="*"
    MaximumVersion="*" 
    MinimumVersion="4.0" />

Silverlight 4.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier="Silverlight"
    Profile=""
    MinimumVersion="4.0"
    DisplayName="Silverlight"
    MinimumVersionDisplayName="4" />

VSMonoTouch.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework DisplayName="VS MonoTouch"
  Identifier=".NETFramework"
  Profile="*"
  MinimumVersion="1.0"
  MaximumVersion="1.0" />

Windows Phone 7.5.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier="Silverlight"
    Profile="WindowsPhone7*"
    MinimumVersion="4.0"
    DisplayName="Windows Phone"
    MinimumVersionDisplayName="7.5" />

I am using Visual Studio 2012 Ultimate Update 2 on Windows Server 2012 64 bit edition. Can someone point me in right direction.

解决方案

It looks like you are targeting Windows Phone 7.0 in your Portable Class Library. Try switching to Windows Phone 7.5 and see if that helps. If not, try posting a screenshot of the PCL "choose targets" screen, as well as the contents of all the XML files you've added to the "SupportedFrameworks" folder.


EDIT: Try deleting VSMonoTouch.xml (and restarting Visual Studio afterwards).

这篇关于MvvMCross 3.0.6 Nuget 包安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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