Recommand · October 22, 2021 0

Error occured while restoring NuGet packages: Data at the root level is invalid. Line 1, position 1

I’m having a problem with NuGet since I clicked on Clear All NuGet Cache(s) button.

Since that time, when I close a project in Visual Studio and open up another project, I need to clear all NuGet cache and restore the packages over and over again!

I got this error often when I need to switch between projects

Error occurred while restoring NuGet packages: Data at the root level is invalid. Line 1, position 1.

enter image description here