I'm migrating to new version of Automatic package restore as described in docs
This documents says, that .nuget folder should be removed completely. Including NuGet.Config, that contained a property, we need:
<config>
<add key="repositoryPath" value="..\..\..\commonNugetPackages" />
</config>
So how one should specify path where packages should be restored?
Update:
Updating to 2.8 fixed the issue. I guess it was this bug. Though it was fixed in 2.7.2 and I had 2.7.4.
I would keep the NuGet.Config file since you are using it to change the default packages directory.
You can delete the NuGet.exe and NuGet.targets file from the .nuget directory and remove the Import in your project files that refers to NuGet.targets.