What is the Nuget repositories.config file for?

.NetVisual StudioNuget

.Net Problem Overview


What is the file packages/repositories.config? Should it be kept under version control?

.Net Solutions


Solution 1 - .Net

According to Nuget dev David Ebbo

> If you use the Package Restore workflow, you can completely omit the Packages folder from source control (including this file).

https://stackoverflow.com/a/7297465/284795

Solution 2 - .Net

If you open it in a text editor, you will see it is a list of all of the packages.config files for your solution.

Should it be kept under version control? That depends. NuGet's built in package restore feature will recreate this file because it uses the packages.config file for each project when that project is built. However, TeamCity's package restore feature uses packages/repositories.config.

Why would you use the TeamCity package restore if you have NuGet's package restore enabled? If you have a Silverlight project with NuGet packages, for some reason something goes wrong with the package restore when building with MSBuild. For more details, check my question on the issue. https://stackoverflow.com/questions/8435938/issue-with-packagerestore-silverlight-and-msbuild

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionColonel PanicView Question on Stackoverflow
Solution 1 - .NetColonel PanicView Answer on Stackoverflow
Solution 2 - .Netcadrell0View Answer on Stackoverflow