What is the Nuget repositories.config file for?

前端 未结 2 1133
醉酒成梦
醉酒成梦 2020-12-29 01:07

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

相关标签:
2条回答
  • 2020-12-29 01:18

    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. Issue with PackageRestore, Silverlight, and MSBuild

    0 讨论(0)
  • 2020-12-29 01:29

    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

    0 讨论(0)
提交回复
热议问题