NuGet - repositories.config

It's a file that's mostly a NuGet implementation detail, and should not be dealt with directly (it may go away or change in the future).

But for reference, it contains a list of paths that point to all the packages.config in the solution. Typically there is one per project that uses NuGet.


David Ebbo's answer is from 2011, and the official advice keeps changing between versions.

Here's where we stand in 2015, for NuGet 2.7+ with the 'Automatic Package Restore' (recommended) workflow

I'm paraphrasing, but basically the advice is:

Remove packages/repositories.config from source control. We'll re-generate it anyway.

...unless it somehow breaks on your machine. Then do add it to source control.

This hint comes from the section on ignoring files in git:

# Ignore NuGet Packages
*.nupkg
# Ignore the packages folder
**/packages/*

And the important part:

[...]

# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config