问题
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?
回答1:
I had similar issue while installing MvvMCross 3.0.6 Nuget package. I had raised a similar question MvvMCross 3.0.6 Nuget package installation issue
So I followed Stuarts suggestion and referred the MvvmCross dll's directly in the project which worked like a charm. You can download the MvvMCross code from https://github.com/slodge/MvvmCross.
回答2:
I'm not sure, but what version of NuGet are you running?
To get the MonoTouch and MonoAndroid support (and some of the Portable support) you will need Nuget 2.5 installed
回答3:
Just as a side note (and dunno if it's going to fix this): you can check your nuget version in Tools > Extensions and Updates. Here you can view the list of your installed packages, as well as their version.
Also, if you nuget package manager is out of date, it will show up under the 'Updates' category.
... on the other hand, you package manager console says it's version 2.5.something, so I'm guessing you're up to date on that one.
回答4:
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.
回答5:
Not sure, but could there be an issue with the NuGet package MvvmCross.PortableSupport ?
Click the image to see it in full resolution...
Also check the NuGet docs for details on the supported Target Framework variables: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Matching_Assembly_Version_to_the_Target_Framework_of_a_Project
来源:https://stackoverflow.com/questions/16539385/error-installing-mvvmcross-from-nuget-into-a-pcl