Reputation: 7700
I have a few projects using numerous NuGet packages and these projects are source controlled on TFS. Whenever the packages are restored, they are automatically readded to source control.
I am using Visual Studio 2013 Update 3 and TFS 2013 with local workspaces and my NuGet version is 2.8.50313.46.
I am apparently not the only one to have this issue. Quite an amount of people have been asking this on StackOverflow but none of them were able to solve this issue or at least not with new implementation of package restore in NuGet. I tried the .tfignore in solution folder with '/packages' exclusion but it did not work either. So I am now asking for help here because sooner or later, someone is gonna checkin those files!
Thanks.
Note: There is about 20 users using this TFS, so applying an individual fix on each machine is not something I am looking into.
Upvotes: 1
Views: 870
Reputation: 3896
Right click on the solution folder -> enable nuget package restore on build. That will create the required configuration, and also enable other team members to build the project automatically.
then you should commit the project. make sure to delete all packages. and then if possible try a new checkout on each machine.
Upvotes: -1
Reputation: 336
You can add to your solution new folder called ".nuget", under the folder put file called "NuGet.config", inside the file add the nuget configuration:
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
For more information: http://docs.nuget.org/docs/reference/package-restore
Upvotes: 3