尝试将RestSharp从105.2.3降级到105.1.0,但不能。保持最新版本工作正常并安装良好。
Install-Package RestSharp -Version 105.1.0
Attempting to gather dependency information for package 'RestSharp.105.1.0' with respect to project 'project.iOS', targeting 'Xamarin.iOS,Version=v1.0'
Attempting to resolve dependencies for package 'RestSharp.105.1.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'RestSharp.105.1.0'
Resolved actions to install package 'RestSharp.105.1.0'
Install failed. Rolling back...
Package 'RestSharp.105.1.0' does not exist in project 'project.iOS'
Package 'RestSharp.105.1.0' does not exist in folder 'C:\Users\....project\packages'
Install-Package : Could not install package 'RestSharp 105.1.0'. 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 RestSharp -Version 105.1.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package RestSharp
Attempting to gather dependency information for package 'RestSharp.105.2.3' with respect to project 'project.iOS', targeting 'Xamarin.iOS,Version=v1.0'
Attempting to resolve dependencies for package 'RestSharp.105.2.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'RestSharp.105.2.3'
Resolved actions to install package 'RestSharp.105.2.3'
Package 'RestSharp.105.2.3' already exists in folder 'C:\Users\...\project\packages'
Added package 'RestSharp.105.2.3' to 'packages.config'
Successfully installed 'RestSharp 105.2.3' to project.iOS
答案 0 :(得分:0)
如果你看一下NuGet包,答案就会很清楚。
https://www.nuget.org/packages/RestSharp/105.1.0
解压缩.nupkg
并转到lib
文件夹
您将在此处看到相应的目标。请注意,105.1.0 NuGet包中的Xamarin.iOS10
或MonoTouch10
没有目标。
但是如果你这样做
https://www.nuget.org/packages/RestSharp/105.2.3
您会看到Xamarin.iOS10
和MonoTouch10
的目标。