简体   繁体   中英

VS2017 nuget failed to load project dependencies

I'm having this particular problem in the recent version of VS2017 (15.5.3). Even when I create a fresh new solution, using AspNet.Core template for example, I'm getting this Nuget resolving dependency error in Solution Explorer right after opening that particular (new) solution. And it's not only for Nuget remote packages, it behaviors the same even with project references which causes me an extra problem as I cannot use intelisense (for libraries out of the current one) and other VS fancy features because of that. On the other hand if I run dotnet restore command everything works just fine so the problem is in Visual Studio I guess and not with dotnet core in general. Also dotnet build and dotnet publish also work like a charm.

And this is the specific error message I usually get when I try to restore nuget packages by right-clicking on the solution: Error occurred while restoring NuGet packages: The operation failed as details for project "x" could not be loaded.

Just to mention, I've tried reinstalling Visual Studio, both Comunity and Enterpise edition, and that went without luck too. And what is very interesting, all teammates got the very same version of Visual Studio and solution itself and they are not facing the same issue.

Any idea what could be a possible solution? Anyone faced the same issue? I've tried solutions from this post but none works for me: VS2017 The operation failed as details for project could not be loaded .

Thanks.

I got in a similar situation

  • VS2017 (15.5.6).
  • "The operation failed as details for project 'x' could not be loaded" for a .Net Core project.
  • dotnet restore command seemed to wor at first, but errors remained.
  • Also, the special folder Dependencies was marked with a yellow "warning" icon in each project.

Searching for bugs in NuGet related to this, I found this post ( https://developercommunity.visualstudio.com/content/problem/160750/nuget-bug-in-vs155.html ).

The problem (and the workaround) turned out to be very simple. The project was located under a folder with a "special character" in the name, such as C:\\Projects\\A&B\\ . I just removed the "&" character in the folder name ( C:\\Projects\\AB\\ ), reopened the solution, and everything seems to be working just fine now.

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM