Use solution relative packages folder with NuGet and project.json
<p>I have a solution with a <code>packages</code> folder checked into source control. I changed some of the projects to use a <code>project.json</code> file rather than <code>packages.config</code> for defining dependencies. The projects are all normal <code>.csproj</code> projects, not DNX <code>.xproj</code> projects. Everything seemed to be working correctly however after updating a package I noticed that the new version wasn't added to the solution's <code>packages</code> folder. Instead it was added to NuGet's new shared packages folder in the user profile folder.</p>

<p>So the question is, how do I get NuGet to use the solution's <code>packages</code> folder rather than the shared folder?</p>

<p>Approaches I've tried so far without success:</p>

<ul>
<li>Adding <code>global.json</code> file in the solution folder specifying <code>"packages": "packages"</code></li>
<li>Setting <code>&lt;add key="disableSourceControlIntegration" value="false" /&gt;</code> in <code>.nuget\nuget.config</code></li>
</ul>