I use Nuget 2.2.31210.9045 on VS2012+TFS2010 with enabled "Package Restore" and configured "custom package folder location" and met several issues.
Steps to reproduce:
1) I created a solution with project A.
2) Enabled Package restore on solution.
3) Created nuget.config in the solution folder with the following contents
<?xml version="1.0" encoding="utf-8"?>
<add key="repositoryPath" value="Shared" />
4) Opened “Manage Nuget Packages” form and installed NLog package to ProjectA.
Folder with name “Shared” should be created on disk and not added to TFS.
Folder with name Shared was created but marked as added to TFS (Issue #1).
I guess it is not correct as Package Restore option is enabled, so it should have been just created but not added.
5) I closed solution, removed folder Shared from the disk in Explorer.
6) Opened solution again, initiated build.
Nuget should create Shared folder, restore packages into it and solution should be built successfully.
a) Packages folder was created in the solution folder (Issue #2) Why?
b) Shared folder wasn’t created and so the solution wasn’t build (Issue #3) Why?
7) I opened “Manage Nuget packages” window and saw an yellow message “Some Nuget packages are missing from this solution. Click to restore.”
After I clicked Restore, Shared folder was created with the required packages, so the next build was successful.
But this folder marked as added to TFS again :-// (Issue #4)
Why all these issues #1-4 happen?