简体   繁体   中英

Migrating to NuGet Automatic Package Restore

I am migrating MSBuild-Integrated package restore to Automatic Package Restore which became available with v2.7 of NuGet. Steps are easy to follow but I am confused with part that mentions .nuget/NuGet.Config

If I create a new solution with few projects, Automatic Package Restore "just works" and there is no .nuget folder at the solution level at all...

  1. So why does migration doc mention I need to leave it? It works if I remove it...
  2. I read in the docs that one possible advantage of leaving it is that " Using this approach, rather than cloaking the packages folder or otherwise ignoring it, allows NuGet to completely skip the call into Visual Studio to pend changes to the packages folder. " Is that it? Is this a big advantage (as opposed to having a cleaner solution)?

NOTE: I am using Git in TFS and not TVSVC.

That NuGet.Config file is only for Team Foundation Server (TFS). If you are not using TFS, then you can safely remove it. To quote Migrating MSBuild-Integrated solutions to use Automatic Package Restore :

By default, the NuGet.Config file instructs NuGet to bypass adding package binaries to source control. Automatic Package Restore will honor this as long as you leave this file in place. Note that NuGet.Config only has an effect when using Visual Studio to integrate with Team Foundation Server (TFS).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM