This is the error message that nuget.exe gives when consent is not enabled and attempting to restore :
"By default, package restore is disabled. You need to enable it by setting the key 'packageRestore\enabled' to 'true' in nuget.config or setting the environment variable 'EnableNuGetPackageRestore' to 'true'."
The nuget.config that may come to mind in this case is the one already in the solution under .nuget\nuget.config. Setting the key 'packageRestore\enabled' in there won't allow consent (expected). Suggesting we mention "global nuget.config", something along those lines.
Comments: I'm getting the "You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'." message persistently on our CI build server. Nuget updated, installed VS and set option for "Allow NuGet to download missing packages during build" and also set environment variable EnableNuGetPackageRestore as both user variable and system variable. Build still breaks with this message.
"By default, package restore is disabled. You need to enable it by setting the key 'packageRestore\enabled' to 'true' in nuget.config or setting the environment variable 'EnableNuGetPackageRestore' to 'true'."
The nuget.config that may come to mind in this case is the one already in the solution under .nuget\nuget.config. Setting the key 'packageRestore\enabled' in there won't allow consent (expected). Suggesting we mention "global nuget.config", something along those lines.
Comments: I'm getting the "You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'." message persistently on our CI build server. Nuget updated, installed VS and set option for "Allow NuGet to download missing packages during build" and also set environment variable EnableNuGetPackageRestore as both user variable and system variable. Build still breaks with this message.