8

enter image description here

i have simple folder structure:

project1
|_ nuget.config http://tinyurl.com/84ynb9z
|_ packages.config http://tinyurl.com/72zpy3z
project2
|_ nuget.config http://tinyurl.com/84ynb9z
|_ packages.config http://tinyurl.com/72zpy3z
packages
|_ FluentNHibernate.1.2.0.712
|_ FluentValidation.3.2.0.0

i need to restore packages from packages.config file (very trivial)

im using new function in nuget 1.6 that can restore packages when building, but i have 2 issues with it:

  1. packages always "installed" in root folder. i tried to change NuGet.targets file a lot of times with a lot of variations but it always installed in root :(

  2. it shows that packages installed (http://tinyurl.com/7f2ow6k) but nothing updated in References

btw:

im using nuget 1.6

i read http://goo.gl/zZabG and http://goo.gl/mJL7N already but nothing

Sasha
  • 20,424
  • 9
  • 40
  • 57
  • possible duplicate of [Is it possible to change the location of packages for NuGet?](http://stackoverflow.com/questions/4092759/is-it-possible-to-change-the-location-of-packages-for-nuget) – Moslem Ben Dhaou Feb 03 '14 at 20:26

2 Answers2

0

I update my Nuget.targets file that way, and the next build installed my packages in the "libs" directory

<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "libs"))</PackagesDir>

but, references are not updated.

References are fixed by the first install. Then you have to re-install your packages (uninstall and then re-install), it will use the nuget.config file.

Then, for further builds, the NuGet.targets will used.

Not very intuitive but it works for me, hope it helps.

user484189
  • 191
  • 5
0

This is a known issue with NuGet when using a different folder to install packages than the default location :

http://nuget.codeplex.com/workitem/1990

It's currently assigned to be fixed in NuGet 1.9.

Alexandre Dion
  • 9,130
  • 2
  • 41
  • 29