NuGet 3.2 added support for specifying a shared global package folder using an environment variable NUGET_PACKAGES
. You can set the full path to the alternative global package folder, however, I found that if you just set the variable to “packages”, then NuGet tools in Visual Studio will treat it as a relative path in the folder with your solution. This allowed me to install and restore NuGet packages using the folder packages
.
, Microsoft.NuGet.targets
, NuGet. NugetPackagesDirectory
msbuild, , . , C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.props
:
<PropertyGroup Condition="'$(NugetPackagesDirectory)' == ''">
<NugetPackagesDirectory>$(SolutionDir)packages</NugetPackagesDirectory>
</PropertyGroup>
, props
, . .
, , , packages\<package_name>\<version>\
packages\<package_name>.<version>\
, . , .
, -, . - NuGet project.json
, packages.config
.