When developing locally, I have Nuget packages installed in the default folder (\ packages in the solution folder).
I want to have a different folder on my build server, which acts as a path to the repository, where I can also download packages, effectively providing me with a local cache of packages that will be stored in assemblies, without requiring all packages to be loaded every time to build.
On the CI server, I drop the nuget.config file into the solution directory, which indicates the location of the new package folder:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositorypath" value="x:\nugetPackages" />
</config>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
</configuration>
x:\nugetPackages \, , , DLL . , hintPath - "..\packages\lib\lib.dll", , .
msbuild - . , msbuild script, :
, : error CS0246: The type or namespace name 'HttpRequestMessage' could not be found (are you missing a using directive or an assembly reference?)
, MSBuild script :
- nuget "cache" (, x:\nugetPackages).
- (..\packages).
- .
, , - ? , XSLT hintPath . , ?