NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0

前端 未结 16 2059
傲寒
傲寒 2020-12-15 02:03

I have such error in vs 2012: NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0

I see

相关标签:
16条回答
  • 2020-12-15 02:49

    In Visual Studio 2015:

    Go to Options->NuGet Package Manager-> Package Sources, make sure "Microsoft and .Net" is checked in the Machine-wide package list.

    0 讨论(0)
  • 2020-12-15 02:53

    I fixed this by deleting the visual studio solution user options file (.suo) and then restarting VS.

    UPDATE: For VS 2017, you need to delete a hidden folder named .vs located in solution directory (Thanks @Tien Dinh!)

    0 讨论(0)
  • 2020-12-15 02:53

    Let's check the name of packages in file packages.config. Sometime the name incorrect it occurr

    0 讨论(0)
  • 2020-12-15 02:57

    Had the same issue with VS2013 today. After running an update on installed packages (tools -> extensions and updates) (which included nuget), and installing some updates for VS2013 (windows update had some), it has gone away.

    So basically, check for those updates, update, and it might solve the issue.

    0 讨论(0)
  • 2020-12-15 02:57

    I uninstalled and reinstalled nUnit 3.7.1 and everything started working again. I have a few nuget packages, but nunit 3.7.1 is the only one I reinstalled, I left the rest alone.

    0 讨论(0)
  • 2020-12-15 02:58

    Just as a brief note. I got this error by running the project on a mapped network drive i.e. T:\NetworkFolder\Project\Solution.sln.

    Obviously the solution is simple - don't do this - copy it onto your machine. Might save someone some pain at some point.

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