Reputation: 4498
I am using nuget automatic restore (the newer version, not MSBuild-integrated restore). When I build my solution, all the dependencies get downloaded, however, visual studio always adds the packages directory to source control (I'm using TFS). I've tried updating the .tfignore file and adding a .nuget/NuGet.config with <add key="disableSourceControlIntegration" value="true" />
. But nothing seems to work. How do I make visual studio and tfs ignore the packages directory?
Upvotes: 0
Views: 242
Reputation: 4498
The solution was to right-click on the solution and click "Enable NuGet Package Restore".
Then add the following to .tfignore:
\packages*
EDIT: I originally followed the instructions here for auto restore but was unsuccessful. Then I enabled Nuget Package Restore as described above. This worked, but is a deprecated feature (as noted by @Daniel Mann). Finally, I followed the instructions here for migrating to auto restore and now everything works correctly. I don't know if this is the right procedure, but it worked for me.
Upvotes: 2