Nuget Packages are missing in Visual Studio

纵然是瞬间 提交于 2020-02-02 11:24:04

问题


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


回答1:


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




回答2:


Right click on the solution in solution explorer and choose 'restore nuget packages'



来源:https://stackoverflow.com/questions/35922387/nuget-packages-are-missing-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!