2014-05-06 79 views
0

有许多报告说MvvmCross可以安装在配置文件78中,但在我的环境中不能。无法从Xamarin Studio上的Nuget管理器安装MvvmCross

当我尝试的NuGet经理安装MvvmCross,我得到以下信息:

Could not install package 'MvvmCross.PortableSupport 3.1.1'. You are trying to install this package into a project that targets 'portable-Profile78', 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. System.InvalidOperationException: Could not install package 'MvvmCross.PortableSupport 3.1.1'. You are trying to install this package into a project that targets 'portable-Profile78', 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.

Environmrnt是:

=== Xamarin Studio === 

Version 4.2.4 (build 35) Installation UUID: 7b4d01c4-ec8d-4fd7-bcf3-46ea74a47d8b Runtime: 
    Mono 3.2.6 ((no/9b58377) 
    GTK+ 2.24.23 (Raleigh theme) 

    Package version: 302060000 

=== Apple Developer Tools === 

Xcode 5.1.1 (5085) Build 5B1008 

=== Xamarin.iOS === 

Version: 7.2.1.42 (Business Edition) Hash: 773c77c Branch: Build date: 2014-04-18 15:39:16-0400 

=== Xamarin.Mac === 

Xamarin.Mac: Not Installed 

=== Xamarin.Android === 

Version: 4.12.3 (Business Edition) Android SDK: /adt-bundle-mac/sdk 
    Supported Android versions: 
     2.1 (API level 7) 
     2.2 (API level 8) 
     2.3 (API level 10) 
     3.1 (API level 12) 
     4.0 (API level 14) 
     4.0.3 (API level 15) 
     4.1 (API level 16) 
     4.2 (API level 17) 
     4.3 (API level 18) 
     4.4 (API level 19) Java SDK: /usr java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) 

=== Build Information === 

Release ID: 402040035 Git revision: 1173cb1c45bc56cb702e82cd21a7c9d0cea4acbf Build date: 2014-04-17 13:45:52-04 Xamarin addins: 53bde0041263928e8bd64686f5ca5a8e4338dd76 

=== Operating System === 

Mac OS X 10.9.2 Darwin ootsuka-no-MacBook-Air.local 13.1.0 Darwin Kernel Version 13.1.0 
    Wed Apr 2 23:52:02 PDT 2014 
    root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64 

和的NuGet经理是0.9,最新的版本。

我当时的解决办法尝试:

  • 我更新了所有Xamarin组件,XS,单声道,XA和XIOS。但它无法解决问题。
  • 我卸载了Nuget管理器并重新安装它 - 没有解决问题。
  • 我在配置文件7中制作了PCL项目,然后安装MvvmCross成功。
    因此,我将项目更改为配置文件78,并手动更改package.config。
    这适用于iOS和Android,但我仅在示例代码中进行了测试。

有人可以提出一个更好的方法来解决这个问题吗?

+0

尝试更新您的Xamarin工作室 – choper

回答

2

由于某种原因,您似乎没有安装PCL配置文件78。

我基于这样的事实,我期望NuGet报告的错误消息包含框架名称并且不使用配置文件名称。例如,当我尝试Microsoft.AspNet.Razor 3.1.2安装到靶向资料78项目中,我得到的错误:

Could not install package 'Microsoft.AspNet.Razor 3.1.2'. 
You are trying to install this package into a project that targets 
'portable-net45+wp80+win+MonoAndroid10+MonoTouch10'. 

我可以安装MvvmCross.PortableSupport 3.1.1进入为目标的PCL项目配置文件78在Mac上使用Xamarin Studio 4.2.4和Mono 3.2.6。

您可以尝试重新安装Mono以尝试修复此问题。但是你说你已经试过了。

我也有一个simple C# console application,你可以用它来显示你的机器上安装的PCL配置文件。从这个输出我的Mac上使用Mono 3.2.6安装是:

.NETPortable root path found: /Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/4.5/../xbuild-frameworks/.NETPortable 

.NETPortable profiles: 
Profile136 net40+sl50+wp80+win+MonoAndroid10+MonoTouch10 
Profile14 net40+sl50+MonoAndroid10+MonoTouch10 
Profile147 net403+sl50+wp80+win+MonoAndroid10+MonoTouch10 
Profile158 net45+sl50+wp80+win+MonoAndroid10+MonoTouch10 
Profile19 net403+sl50+MonoAndroid10+MonoTouch10 
Profile24 net45+sl50+MonoAndroid10+MonoTouch10 
Profile37 net40+sl50+win+MonoAndroid10+MonoTouch10 
Profile42 net403+sl50+win+MonoAndroid10+MonoTouch10 
Profile47 net45+sl50+win+MonoAndroid10+MonoTouch10 
Profile5 net40+win+MonoAndroid10+MonoTouch10 
Profile6 net403+win+MonoAndroid10+MonoTouch10 
Profile49 net45+wp80+MonoAndroid10+MonoTouch10 
Profile7 net45+win+MonoAndroid10+MonoTouch10 
Profile78 net45+wp80+win+MonoAndroid10+MonoTouch10 

您还可以看看/Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/xbuild -frameworks/.NETPortable目录并查看那里有哪些配置文件。

+0

谢谢!至于你说的,我想你的应用程序,显示出这一点: Profile1的net40 + WIN + SL40 + WP + Xbox40 Profile104 net45 + WIN + SL40 + wp71 Profile131 net403 + WIN + SL40 + WP + Xbox40 Profile14 net40 + SL50 Profile18 net403 + SL40 Profile19 net403 + SL50 Profile2中net40 + WIN + SL40 + WP Profile23 net45 + SL40 Profile24 net45 + SL50 Profile3的net40 + SL40 Profile36 net40 + WIN + SL40 Profile37 net40 + WIN + SL50 – kochizufan

+0

Profile4 net45 + win + sl40 + wp Profile41 net403 + win + sl40 Profile42 net403 + win + sl50 Profile46 net45 + win + SL40 Profile47 net45 + WIN + SL50 规范5 net40 +赢得 Profile6 net403 +赢得 Profile88 net40 + WIN + SL40 + wp71 Profile95 net403 + WIN + SL40 + WP Profile96 net403 + WIN + SL40 + wp71 Profile7 net45 + win – kochizufan

+0

我的环境可能的可移植方式是: /Library/Frameworks/Mono.framework/External/xbuild-frameworks/.NETPortable /Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/4.5/ ../xbuild-frameworks/.NETPortable 后来包括P78但前者不是,但我的Xamarin使用前者作为根路径。 – kochizufan

相关问题