我创建了可移植类库项目,但我无法将Portable支持Mvvmcross插件安装到其中。
我收到以下错误:
------- 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是最新的。
答案 0 :(得分: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.因此它不兼容。您无法将可移植类库安装到以旧框架版本为目标的可移植类库项目中。您需要更改便携式类库项目的配置文件,以便它以这些框架为目标。
答案 1 :(得分:0)
我无法取消选择Silverlight 5.我选择了Windows 8目标,然后我可以取消选择Silverlight 5.最新的NuGet 2.8.3需要处理最新的MonoTouch10和MonoAndroid10。