title: Nuget - Package restore is disabled by default. To give consent, open the Visual Studio Options dialog. (Nuget package restore on a build server)
body: <p>So, the error I'm getting when my build server builds my project is:</p>
  
  <blockquote>
    <p>Package restore is disabled by default. To give consent, open the
    Visual Studio Options dialog.</p>
  </blockquote>
  
  <p>I'm aware of what this error means and how to resolve it.  The problem is I cannot change anything on the build server - my company won't allow it.  Additionally, creating an environment variable called EnableNuGetPackageRestore and setting it to <code>true</code> is not an option because that involves modifying the build server.</p>
  
  <p><strong>My question is</strong>: is it possible to simply check all of the NuGet packages that are part of a solution into source control so then the build server won't have any reason to go out and re-download them?  If so, then perhaps you could explain why this error is still happening, when I've verified that all of the NuGet packages (.nupkg) are in the packages folder in source control:</p>
  
  <p><img src="https://i.stack.imgur.com/PdL1j.jpg" alt="enter image description here"></p>
  
  <p><strong>Second Question</strong>: Forgive my ignorance, but what is the reason for the "package restore" feature?  Is it to ensure that each package is up to date with the latest version of that package?  It seems to me that this "feature" should be a setting that shouldn't hinder building a project on a build server.  In my mind, if we want the build server to look for newer packages, then sure, do it, otherwise if I have all my packages in source control and we tell the build server somehow to <strong>NOT</strong> look for newer packages, that sounds reasonable to me.  </p>