I have cloned a git repository containing a VS project referencing Json.Net as a NuGet package. This reference appears in the form:
<HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
I have the repository cloned (along with all my other git repositories) to D:\Repos
.
As you can see, there is no possible way I can have my packages installed 3 directories above this.
Using an environment variable (NUGET_PACKAGES
) or a packages.config
file doesn't appear to override the relative paths that get hard-baked into project files on package installation.
While this exact instance could be solved by burying this particular repo 3 folders deeper in the file system, this is not a solution to the problem.
Is it possible to tell Visual Studio to ignore these author-specified HintPath
s in favor of a user-specified path of some sort?