Aleksei Petrenko
Aleksei Petrenko

Reputation: 7178

Cannot install MvvmCross - CrossCore - Portable support in Xamarin Studio 4.2.2

I created the Portable Class Library project but I cannot install the Portable support Mvvmcross plugin into it.

I'm getting the following error:

------- 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()
==============================

Please someone help me with this issue.

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

Added:

Some details about the system: Windows 7 x64, NO Visual Studio installed, Portable Libraries installed manually with /buildmachine key, .NET Framework 4.5 is up to date.

Upvotes: 0

Views: 1061

Answers (2)

I couldn't deselect Silverlight 5. I selected Windows 8 target and then I was able to deselect Silverlight 5. Latest NuGet 2.8.3 required to handle latest MonoTouch10 and MonoAndroid10.

Upvotes: 0

Matt Ward
Matt Ward

Reputation: 47917

The problem is that MvvmCross.PortableSupport 3.1.1 has a portable class library that targets:

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

Whilst your portable class library project is targeting:

portable-win+net45+sl40+wp71

The MonoAndroid and MonoTouch frameworks are optional and will not be used in the comparison if you are using NuGet 2.7.2 or above. Your project is targeting Silverlight 4.0 and Windows Phone 7.1 whilst MvvmCross.PortableSupport is targeting Silverlight 5.0 and Windows Phone 8. So it is not compatible. You cannot install a portable class library into a portable class library project that targets older framework versions. You will need to change the profile for your portable class library project so that it targets these frameworks.

Upvotes: 3

Related Questions