i have the following setting:
Similar question was asked here, and the answer explains that:
The reason why these were causing problems is because NuGet looks for the solution level packages folder to decide which package dependencies to pull in (not quite sure how this determination is made). If the path to that packages folder is incorrect (as it would be if NuGet uses the wrong solution file), then it can't resolve the dependencies correctly. In addition if the packages folder is empty, it also cannot resolve the dependencies correctly.
I had the same problem and adding solution file to project folder (previously without solution) helped me to resolve the issue.