Search code examples
visual-studio-2012nugetmvvmcrossportable-class-library

Error installing MVVMCross from nuget into a PCL


When I try to install MvvmCross into a new PCL I receive an error. The console log is below:

Package Manager Console Host Version 2.5.40416.9020

Type 'get-help NuGet' to see all available NuGet commands.

PM> install-package MvvmCross
Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.6)'.
``Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.6)'.
Installing 'MvvmCross.PortableSupport 3.0.6'.
Successfully installed 'MvvmCross.PortableSupport 3.0.6'.
Installing 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Installing 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Installing 'MvvmCross 3.0.6'.
Successfully installed 'MvvmCross 3.0.6'.
Adding 'MvvmCross.PortableSupport 3.0.6' to Clevermed.Badger.Mobile.Core.
Uninstalling 'MvvmCross.PortableSupport 3.0.6'.
Successfully uninstalled 'MvvmCross.PortableSupport 3.0.6'.
Install failed. Rolling back...
install-package : Specified argument was out of the range of valid values.
Parameter name: supportedFrameworks
At line:1 char:1
+ install-package MvvmCross
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Install-Package], ArgumentOutOfRangeException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I'm using Profile104 as described in http://slodge.blogspot.com/2013/04/my-current-pcl-setup-in-visual-studio.html

This is a similar but separate error to MvvMCross 3.0.6 Nuget package installation issue

Furthermore, if I right click on the solution and 'Manage NuGet packages' I receive the error 'Specified argument was out of the range of valid values. Parameter name: supportedFrameworks'.

Any ideas how I can debug this further?


Solution

  • I'm not sure how, but I had an empty Profile104 folder in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile

    Probably a left over form my first attempts.

    Removing this empty directory allowed the installation to complete without error.