Failed to install MvvmCross.PortableSupport 3.2.1 package in Visual Studio 2013 for PCL profile 158

I have the following setup and have so far failed to add the mvmcross libraries to my project:

  • VS2013 Update 3
  • Nuget Package Manager 2.8.50313.46
  • PCL 158 profile (I also tried others, like 78, etc.).

Install the log below:

Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (β‰₯ 3.2.1)'. Attempting to resolve dependency 'MvvmCross.HotTuna.MvvmCrossLibraries (β‰₯ 3.2.1)'. Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (β‰₯ 3.2.1)'. Attempting to resolve dependency 'MvvmCross.PortableSupport (β‰₯ 3.2.1)'. Installing 'MvvmCross.PortableSupport 3.2.1'. Successfully installed 'MvvmCross.PortableSupport 3.2.1'. Installing 'MvvmCross.HotTuna.CrossCore 3.2.1'. Successfully installed 'MvvmCross.HotTuna.CrossCore 3.2.1'. Installing 'MvvmCross.HotTuna.MvvmCrossLibraries 3.2.1'. Successfully installed 'MvvmCross.HotTuna.MvvmCrossLibraries 3.2.1'. Installing 'MvvmCross.HotTuna.StarterPack 3.2.1'. Successfully installed 'MvvmCross.HotTuna.StarterPack 3.2.1'. Installing 'MvvmCross 3.2.1'. Successfully installed 'MvvmCross 3.2.1'. Adding 'MvvmCross.PortableSupport 3.2.1' to ClassLibrary1. Uninstalling 'MvvmCross.PortableSupport 3.2.1'. Successfully uninstalled 'MvvmCross.PortableSupport 3.2.1'. Install failed. Rolling back... Could not install package 'MvvmCross.PortableSupport 3.2.1'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+Xamarin.iOS10+MonoAndroid10+MonoTouch10', 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. 
+6
source share
2 answers

The problem is that the Xamarin.iOS infrastructure, which is a new framework for unified iOS projects, is not considered an additional NuGet 2.8.2 (2.8.50313.46) or older framework when installing the Portable Class Library (PCL) in a PCL project. NuGet 2.8.2 considers MonoAndroid and MonoTouch as optional, but not Xamarin.iOS.

So your options are one of the following:

  • Install NuGet 2.8.3 alpha .
  • Delete the new xml files of the Xamarin.iOS PCL profile (Xamarin.iOS.Unified.xml).

NuGet 2.8.3 alpha has been changed, so it knows about the structure of Xamarin.iOS and considers it optional.

The new Xamarin.iOS PCL xml profile files were installed by one of the older releases of Xamarin 3.6. The latest version of Xamarin 3.6 does not install new xml files for the unified iOS PCL profile and requires a second installer that installs NuGet 2.8.3 alpha and the new xml files.

If you go to option 2), keep in mind that this will prevent the installation of NuGet packages, such as MvvmCross.PortableSupport, into the Unified Xamarin.iOS project.

+3
source

I changed the profile to 259 and it works.

And if someone does not know how to change the profile:

In Solution Explorer, right-click the project name and select Edit Project Profile. Find the line:

 <TargetFrameworkProfile>Profile158</TargetFrameworkProfile> 

and change Profile158 to Profile259. Make sure the line below it:

  <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 

set to v4.5, not v4.0, or you will receive an error message when you try to restart the project. To reload the project, simply right-click on the project name in Solution Explorer and select reload project.

+5
source

Source: https://habr.com/ru/post/975908/


All Articles