NuGet package restore - “Package restore is disabled by default. To give consent, open the Visual Studio Options dialog”

前端 未结 4 1471
栀梦
栀梦 2021-02-03 23:17

I\'m trying to use NuGet package restore from the command line on a build server.

nuget install myapp/packages.config

However, I get the follow

4条回答
  •  名媛妹妹
    2021-02-03 23:35

    This is currently happening because NuGet Package Restore needs consent before downloading packages and with the current way things work, there's no way to discern a user calling "nuget.exe install packages.config" from package restore. more details on consent here : http://blog.nuget.org/20120518/package-restore-and-consent.html

    note: this issue should be fixed next week.

    As a workaround, you can give consent by setting the EnableNuGetPackageRestore environment variable to true.

提交回复
热议问题