2014-02-12 90 views
0

我創建了可移植類庫項目,但我無法將便攜式支持Mvvmcross插件安裝到其中。無法安裝MvvmCross - CrossCore - Xamarin Studio 4.2.2中的便攜式支持

,我發現了以下錯誤:

------- Installing...MvvmCross.PortableSupport 3.1.1 ------- 
Adding 'MvvmCross.PortableSupport 3.1.1' to Prototype.Core. 
Could not install package 'MvvmCross.PortableSupport 3.1.1'. You are trying to install this package into a project that targets 'portable-win+net45+sl40+wp71', 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-win+net45+sl40+wp71', 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. 
    at NuGet.ProjectManager.ExtractPackageFilesToProject(IPackage package) 
    at NuGet.ProjectManager.AddPackageReferenceToProject(IPackage package) 
    at NuGet.ProjectManager.Execute(PackageOperation operation) 
    at NuGet.ProjectManager.Execute(IPackage package, IPackageOperationResolver resolver) 
    at NuGet.ProjectManager.AddPackageReference(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) 
    at NuGet.ProjectManager.AddPackageReference(String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) 
    at ICSharpCode.PackageManagement.SharpDevelopPackageManager.AddPackageReference(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) 
    at ICSharpCode.PackageManagement.SharpDevelopPackageManager.InstallPackage(IPackage package, InstallPackageAction installAction) 
    at ICSharpCode.PackageManagement.PackageManagementProject.InstallPackage(IPackage package, InstallPackageAction installAction) 
    at ICSharpCode.PackageManagement.InstallPackageAction.ExecuteCore() 
    at ICSharpCode.PackageManagement.ProcessPackageAction.Execute() 
    at ICSharpCode.PackageManagement.PackageActionRunner.Run(IPackageAction action) 
    at ICSharpCode.PackageManagement.PackageViewModel.InstallPackage(IEnumerable`1 packageOperations) 
    at ICSharpCode.PackageManagement.PackageViewModel.InstallPackage() 
    at ICSharpCode.PackageManagement.PackageViewModel.TryInstallingPackage() 
============================== 

請人幫我這個問題。

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

補充:

有關係統的一些細節: Windows 7 x64,未安裝Visual Studio,使用/ buildmachine密鑰手動安裝的可移植庫,.NET Framework 4.5是最新的。

回答

3

的問題是,MvvmCross.PortableSupport 3.1.1具有便攜式類庫目標:

portable-win+net45+sl50+wp8+MonoAndroid+MonoTouch 

雖然便攜式類庫項目的目標是:

portable-win+net45+sl40+wp71 

的MonoAndroid和MonoTouch的框架是可選的,如果您使用的是NuGet 2.7.2或更高版本,則不會用於比較。您的項目針對的是Silverlight 4.0和Windows Phone 7.1,而MvvmCross.PortableSupport則針對Silverlight 5.0和Windows Phone 8.所以它不兼容。您不能將可移植類庫安裝到面向舊版框架的可移植類庫項目中。您將需要更改便攜式類庫項目的配置文件,以便它定位這些框架。

+0

http://forums.xamarin.com/discussion/comment/43750#Comment_43750 - 請參閱本主題中的討論。 –

+0

如果我還想支持WP7.1,該怎麼辦?我如何使用NuGet獲得較舊的版本? –

+0

不幸的是,Xamarin Studio的NuGet插件中缺少能夠安裝特定版本。這是計劃。如果您使用Windows,則可以使用SharpDevelop或Visual Studio Express來安裝特定的MvvmCross.PortableSupport版本。另一種方法是直接下載NuGet包裝,並從.nupkg文件中提取二進制文件,該文件只是一個zip文件。 –

0

我無法取消選擇Silverlight 5.我選擇了Windows 8目標,然後我可以取消選擇Silverlight 5.最新的NuGet 2.8.3需要處理最新的MonoTouch10和MonoAndroid10。