Unable to Install Any Package in Visual Studio 2015

后端 未结 19 2313
太阳男子
太阳男子 2020-12-07 13:32

I\'ve tried every package I could possibly find and none of them will install in my project. I\'ve installed every update listed in the Extensions and Updates list that wer

相关标签:
19条回答
  • 2020-12-07 14:14

    Just to help out anyone who has landed on this page after updating VS2015 to update 2 and trying to manage packages on a website, receiving the "NuGet configuration file is invalid" error, this is a known and acknowledged issue:

    https://connect.microsoft.com/VisualStudio/feedback/details/2698136/nuget-configuration-is-invalid-manage-nuget-packages-for-solution-disabled

    I got mine working again by installing package manager 3.4.4 (beta) from http://dist.nuget.org/index.html

    They do also state update 3 for Visual Studio will also contain a fix

    0 讨论(0)
  • 2020-12-07 14:15

    I was able to resolve this issue by reinstalling Nuget Package Manager via Tools -> Extensions and Updates

    0 讨论(0)
  • 2020-12-07 14:16

    I had this problem with Visual Studio 2017: It turns out that there are two class library projects - one for .Net and the other for C#. I created the one for .Net and when I tried to install a specific package (Nunit in my case) I got the error message.

    Recreating the project as C# class library fixed the problem

    0 讨论(0)
  • 2020-12-07 14:16

    Open the packages folder. Check if files with extension .deleteme exists, example Newtonsoft.Json.9.0.1.deleteme. Delete all the packages which have a .deleteme file manually. Delete the .deleteme files. Close and open the Nuget Explorer.

    0 讨论(0)
  • 2020-12-07 14:17

    Simply restarting Visual Studio works for me.. try restarting Visual Studio.

    0 讨论(0)
  • 2020-12-07 14:17

    Change the "package source" in nuget to All

    Details: None of the above helped in my case. My problem was that I restricted to only one private feed. Once I changed the "package source" to All, my problem was solved. I believe the crux of the matter is that my private pkg has a dependency on other pkgs from nuget.org.

    I hope this can help someone

    0 讨论(0)
提交回复
热议问题