Nugget, how can I determine the location of packages?

enter image description here

I have a 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 package.config file (very trivial)

im using a new function in nuget 1.6 that can restore packages on creation, but I have 2 problems:

  • packages are always "installed" in the root folder. I tried repeatedly changing the NuGet.targets file with a lot of variations, but it was always installed in the root directory: (

  • shows installed packages ( http://tinyurl.com/7f2ow6k ), but nothing is updated in the links

By the way:

im using nuget 1.6

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

+7
source share
2 answers

I am updating the Nuget.targets file this way, and the next build installed my packages in the "libs" directory

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

but the links are not updated.

Links are fixed by the first installation. Then you need to reinstall your packages (uninstall and then reinstall), it will use the nuget.config file.

Then, NuGet.targets will be used for future builds.

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

0
source

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

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

It is currently assigned fixed in NuGet 1.9.

0
source

All Articles