If you want to avoid checking in NuGet packages into your source control system; you have to introduce a .tfignore file into the system.
- Create a text file: tfignore.txt
- Place it next to your solution file
- Open the file and add \packages as the only content
- Open the folder in a command prompt (cmd)
- rename the file by typing: ren tfignore.txt .tfignore
- check the file into source control
- TFS now no longer regards this folder (\packages) as valid content