text: Q:
  
  Why does NuGet uses %APPDATA%\Roaming\packages as repository folder despite configuration?
  
  For some reason my NuGet package are added to .csproj file based on %APPDATA%\Roaming\packages folder and it causes my project not to build via build server. I have checked the configuration in %APPDATA%\Roaming\.nuge\NuGet.config, there repositoryPath is set to ..\packages. I checked %programfiles(x86)\Nuget\Config folder there is no configuration related to globalPackagesFolder.  Would someone please let me know why my packages are restored in %APPDATA%\Roaming\packages folder and how can I fix the issue?
  
  A:
  
  Why does NuGet uses %APPDATA%\Roaming\packages as repository folder
  despite configuration?
  
  The problem is in the global %APPDATA%\Roaming\.nuget\NuGet.config file. In the default nuget.config file, you should not set repositoryPath path. It will use the default repositoryPath path(solution folder\packages\).
  If you add a new repositoryPath path(..\packages) in nuget.config file, it will enable the new reference package path based on the relative path setting ..\packages.
  So the behavior appears and your project references the path %APPDATA%\Roaming\packages.
  Solution
  If you want it back to use the default path, you can try it:
  1) close VS, enter %APPDATA%\Roaming\.nuget\NuGet.config file, delete it:
  <add key="repositoryPath" value="..\packages" />
  
  If you have add a key called globalPackagesFolder and do not want to use it, you can also delete that node.
  When you delete it, then you can use the default repositoryPath.
  2) then test it in another new project and I am sure that this will go away.
  Besides, if you delete it in %APPDATA%\Roaming\.nuget\NuGet.config and does not work, you should check whether you have a custom nuget.config in your solution folder or any Parent directories,if so, you should check the file and delete such node in it. See NuGet.Config file location.
  
  