The NuGet Package Manager fails to install packages into Android and iOS projects.
IDE
Visual Studio 2015
NuGet Version
NuGet Package Manager for Visual Studio ##Version 2015 3.0.60410.213## latest.
Steps to Reproduce
- Create Xamarin Solution from VS Template with standard targets.
- Update Xamarin.Forms Package to latest.
- Clean compile and test all three targets.
- Activate NuGet Package Manager Console to manually install Cheesebaron.MvxPlugins.FormsPresenters each project must have packages installed separately as there is no solution level install
- Install-Package Cheesebaron.MvxPlugins.FormsPresenters -DependencyVersion Lowest -ProjectName SampleApp (installs into the PCL OK)
- Install-Package Cheesebaron.MvxPlugins.FormsPresenters -DependencyVersion Lowest -ProjectName SampleApp.WinPhone (installs into the Windows Phone project OK)
- Install-Package Cheesebaron.MvxPlugins.FormsPresenters -DependencyVersion Lowest -ProjectName SampleApp.Droid (fails)
- Install-Package Cheesebaron.MvxPlugins.FormsPresenters -DependencyVersion Lowest -ProjectName SampleApp.iOS (fails)
- Checked references and packages.config of the two projects that were OK.
Failure Logs
Attempting to gather dependencies information for package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2' with respect to project targeting 'MonoAndroid, Version=v5.0'
Attempting to resolve dependencies for package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2'
Resolved actions to install package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2'
Install failed. Rolling back...
Package 'MvvmCross.PortableSupport 3.5.1' does not exist in project 'SampleApp.Droid'
Install-Package : Could not install package 'MvvmCross.PortableSupport 3.5.1'. You are trying to install this package into a project that targets 'MonoAndroid, Version=v5.0', 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 line:1 char:1
+ Install-Package Cheesebaron.MvxPlugins.FormsPresenters -DependencyVersion Lowest ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Attempting to gather dependencies information for package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2' with respect to project targeting 'Xamarin.iOS, Version=v1.0'
Attempting to resolve dependencies for package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2'
Resolved actions to install package 'Cheesebaron.MvxPlugins.FormsPresenters.0.0.2'
Install failed. Rolling back...
Package 'MvvmCross.PortableSupport 3.5.1' does not exist in project 'SampleApp.iOS'
Install-Package : Could not install package 'MvvmCross.PortableSupport 3.5.1'. You are trying to install this package into a project that targets 'Xamarin.iOS, Version=v1.0', 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 line:1 char:1
+ Install-Package Cheesebaron.MvxPlugins.FormsPresenters -DependencyVersion Lowest ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Analysis
Could not install package 'MvvmCross.PortableSupport 3.5.1'. You are trying to install this package into a project that targets 'MonoAndroid, Version=v5.0', 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.
Could not install package 'MvvmCross.PortableSupport 3.5.1'. You are trying to install this package into a project that targets 'Xamarin.iOS, Version=v1.0', 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.
This seems like a similar issue reported against MvvM Cross Could not install package 'MvvmCross.PortableSupport 3.5.0' and closed by Stuart Lodge.
MonoTouch10 is pre-Unified.
3.2 was our last non-Unified release
See release notes on http://slodge.blogspot.com
However the Droid project is showing a similar error that I do not understand. It appears to be that when installing FormsPresenters it knows that it needs 'MvvmCross.PortableSupport 3.5.1' but that package is not compatible with the Consumer, i.e. FormsPresenters.