Visual Studio 中缺少 Nuget 包 [英] Nuget Packages are missing in Visual Studio

查看:109
本文介绍了Visual Studio 中缺少 Nuget 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 xamarin studio,当我从

当我如下打开Nuget时,有一个按钮可以恢复丢失的包.我点击了它.

然后它试图下载丢失的包,然后它意识到存在如下依赖项:

然后我尝试手动下载依赖项,如下所示,但它显示包已经下载,但我仍然在解决方案中看到丢失的包,没有任何影响.

因此,我收到了如下数百个错误:

当我查看丢失包的属性时,我看到如下

解决方案

你应该在 Visual Studio 中更新你的 NuGet 包管理器扩展,然后再次尝试恢复包.

恢复错误 MvvmCross.Binding 已经有一个为 MvvmCross.Core 定义的依赖 是由于旧版本的 NuGet 包管理器扩展无法识别 MvvmCross.Binding NuGet 包的新目标框架在其组依赖项中使用.此错误已在较新版本的 NuGet 包管理器中修复.

如果您搜索已定义依赖项"错误消息,您会发现几种情况,例如这个 StackOverflow 问题,例如:

无法安装 NuGet 包

I have been using xamarin studio, it works fine when I download a sample project from mvvmcross. It compiles and deploys the device perfectly.

But when I open the project in the visual studio, there are a lot of missing packages for some reasons. Is there a way of handling ? I am using Nuget 2.8 in Visual studio 2013

When I open Nuget as follows, there is a button to restore the missing packages. I clicked on it.

Then it is attempting to download the missing packages, and then it realizes there are dependencies as follows:

Then I am attempting to download the dependency manually as follows but it shows the packages has already downloaded but I am still seeing the missing packages in the solution, nothing is affected.

Therefore I am getting hundreds of errors as follows:

When I take a look at the property of missing packages, I see as follows

解决方案

You should update your NuGet Package Manager extension in Visual Studio and then try restoring the packages again.

The restore error MvvmCross.Binding already has a dependency defined for MvvmCross.Core is caused by an old version of the NuGet package manager extension not recognising the newer target frameworks that the MvvmCross.Binding NuGet package is using in its group dependencies. This bug has been fixed in a newer version of the NuGet Package Manager.

If you search for the 'already has a dependency defined' error message you will find several cases of this, such as this StackOverflow question, for example:

Can not install NuGet package

这篇关于Visual Studio 中缺少 Nuget 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆