1

My first project in VS2015 is an MVC project. Having struggle with various issues around TFS source control clashing with NuGet, I found this answer - Get TFS to ignore my packages folder - which has hopefully fixed that.

However, this project has a fair number of external dependencies on JavaScript libararies, which I also pulled via NuGet. Doing so loads them into my /Scripts/ folder as you might expect. However, TFS also wants to put them in source control.

This would seem to be obviating the point of NuGet, much like storing the packages would. Should I be happy about keeping them in source control? If not, how can I exclude them (I tried adding the path to my .tfignore file to no avail)?

Community
  • 1
  • 1
Bob Tway
  • 9,301
  • 17
  • 80
  • 162

2 Answers2

1

$(Solutiondir)\Packages is where all nuget packages that are being used in the solution are downloaded/cached, there is no need to have this folder under source control.

On the other hand, files from Nuget content packages such as jQuery that are copied into a project folder should be under source control. These files originally come from a nuget package but you should consider them as part of your project(s).

jQuery Nuget package content

Rui Jarimba
  • 11,166
  • 11
  • 56
  • 86
1

You should not have anything under your /packages/ folder under source control.

The default behaviours in Visual Studio is to exclude them if you have the standard .tfignore file, but...

...if you have already had them added to the solution then you will have to manually go exclude them as VS is overriding the ignore. In visual studio delete the files you see from source, and once you do a get from nuget you will have to "undo pending change" for the packages folder, and then likely mark them as ignore.

What should happen is that instead of ending up on the ignore list they will disappear as the .tfignore file kicks in.