I have a .NET Core Visual Studio 2017 solution that references Json.Net 12.0.1. Everything works great in my dev environment. When I run dotnet restore, Json.Net is downloaded to Newtonsoft.Json.12.0.1 in the solutions packages folder.
However, when I run restore on my build server the solution wants to pick up a version of Json.Net from the nuget global cache.
I can force download of all packages to a local packages folder, but this ends up using a different naming convention (Newtonsoft.Json/12.0.1), and of course re-downloads all that stuff that exists in globals anyway. So it just creates a lot of overhead and still doesn't work.
I suppose I could work some hocus pocus in my .csproj files in oder to provide a different hint path for Json.Net but this seems overly complicated.
Is there a way to force Nuget to download Json.net (or any package) to a specific folder in local packages, or otherwise resolve this issue using CLI tools?
Again, this is .NET Core so there is no packages.config.
Thanks!