I have to run "dotnet restore" through the Package Manager Console before being able to build my applications

Viewed 319

I had a problem where I received the error: Nuget error when trying to build my applications. I found a solution here The solution was to run dotnet restore through the Package Manager Console. It helped, but ever since I have to do it for every single project I make. Before this error I have never had this problem

It are .net Core projects in visual studio community 2019

Is there something I can change so I don't have to run dotnet restore before every build.

Edit: added what I was looking for

1 Answers

I once had the same problem when working on Xamarin Forms application, I noticed the problem occurred when there was a disruption in the build/compiling process, because I had experienced power shortage and the laptop went off in between the process.

The fix was to delete the file projects.assets.json, and after that it compiled successfully.

Related