无法添加MvvmCross 6.0.0

时间:2018-04-14 16:23:09

标签: xamarin xamarin.android nuget mvvmcross

我正在尝试将MvvmCross从版本5.x.x升级到6.0.0。我的核心项目更新很好,但在更新我的Android项目时出现问题。我收到以下错误:

Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json -   51.79 ms
Attempting to resolve dependencies for package 'MvvmCross.6.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'MvvmCross.6.0.0'
Resolved actions to install package 'MvvmCross.6.0.0'
Retrieving package 'MvvmCross 6.0.0' from 'nuget.org'.
For adding package 'MvvmCross.6.0.0' to project 'Listing.Mobile.Droid' that targets 'monoandroid81'.
For adding package 'MvvmCross.6.0.0' to project 'Listing.Mobile.Droid' that targets 'monoandroid81'.
Adding package 'MvvmCross.6.0.0' to folder 'C:\VSProjects\Listing\packages'
Added package 'MvvmCross.6.0.0' to folder 'C:\VSProjects\Listing\packages'
Added package 'MvvmCross.6.0.0' to folder 'C:\VSProjects\Listing\packages' from source 'https://api.nuget.org/v3/index.json'
Install failed. Rolling back...
Package 'MvvmCross.6.0.0' does not exist in project 'Listing.Mobile.Droid'
Executing nuget actions took 2.66 sec
Failed to add reference to 'MvvmCross'.
  Reference unavailable.
Time Elapsed: 00:00:03.0575672
========== Finished ==========

我不确定这是一个NuGet问题,MvvmCross问题还是其他问题。我删除了对MvvmCross 5.x.x的所有引用都没有用。我删除了 packages 文件夹中的内容,但仍然没有删除。是否有人遇到过这个问题?

2 个答案:

答案 0 :(得分:1)

我正在使用VS2017。我删除了这个问题。 project.json.lock。当我将项目从VS2015转换为VS2017项目设置时,它可能是遗留下来的。删除后,我能够为所有需要的MvvmCross包添加引用。

答案 1 :(得分:1)

以.framework 4.5为目标的项目,如果要使用6.0.0,则必须创建以.net standard 1.0及更高版本为目标的跨平台解决方案