# NuGet restore question

**URL:** https://www.finalbuilder.com/forums/t/nuget-restore-question/5177
**Category:** Discussion
**Created:** [May 21, 2014, 9:13am UTC](https://www.finalbuilder.com/forums/t/nuget-restore-question/5177 "2014-05-21T09:13:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [May 21, 2014, 9:13am UTC](https://www.finalbuilder.com/forums/t/nuget-restore-question/5177/1 "2014-05-21T09:13:49Z")

</div>

Hello,   
   
 The new NuGet restore action is awesome. I no longer have to run NuGet.exe with custom parameters. I have a question though. I prefer to use this directory structure in my software:   
   
 doc   
 lib   
 src   
 tools   
   
 This means that all projects (and the sln file) is located in src. Therefore I have created a _nuget.config_ that makes sure that I don't have a packages in the _src_ folder, but NuGet uses the _lib_ in the root (works much better in case you need to check in other libs that are not on NuGet).   
   
 The restore action says this though:

 ![13495_nugetrestore](https://www.finalbuilder.com/forums/uploads/default/original/2X/f/faaf47b1de422607a8d3fb9e17e0469bb04fbd88.png)

Would it be possible to follow the NuGet standards (or is this the NuGet standard)? What I would like to see is this behavior:

` configFile = ` ` "%appdata%\NuGet\nuget.config" ` ` ; `

` if ` ` (slnFileSpecified) `

` { `

` ` ` string ` ` slnConfigFile = Path.Combine(slnDirectory, ` ` "nuget.config" ` ` ); `

` ` ` if ` ` (File.Exists(slnConfigFile)) `

` ` ` { `

` ` ` configFile = slnConfigFile; `

` ` ` } `

` } `

Then I (and others?) can skip another input field :-)

---

<div class="post-metadata">

### Author: ![peter.toms](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@peter.toms](https://www.finalbuilder.com/forums/u/peter.toms)
#### Post date: [May 22, 2014, 2:51am UTC](https://www.finalbuilder.com/forums/t/nuget-restore-question/5177/2 "2014-05-22T02:51:18Z")

</div>

Hi Geert, that’s great, we are happy to hear that your enjoying NuGet restores!   
  
You can achieve this outcome by enabling NuGet restore on the solution (right click the solution and select ‘Enable NuGet Package Restore’), this will generate a number of files under a .nuget folder. You can then edit these files as required and check-in .nuget\NuGet.config and optionally .nuget\NuGet.targets (if you wish to enable auto restores vs msbuild) into your repository.   
  
For example you could add something like this to your .nuget\NuGet.config:   
``

`<config>`

`  <add key=“repositoryPath” value="…\somecoolfolder" />`

`config>`

`Once this is done you will no longer need to provide a location for the Config file as part of the restore action. For full details please refer to the NuGet config file documentation at http://docs.nuget.org/docs/reference/nuget-config-file Please let me know how you go Thanks.`

---

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [May 23, 2014, 9:31am UTC](https://www.finalbuilder.com/forums/t/nuget-restore-question/5177/3 "2014-05-23T09:31:41Z")

</div>

Hi Pete,   
  
 Thanks for the info. The NuGet restore feature is deprecated. The only thing the NuGet team needs to do is to remove the menu item from the context menu (see [https://nuget.codeplex.com/workitem/4019](https://nuget.codeplex.com/workitem/4019)). I have already specified the nuget.config inside the same folder as the sln file. However, when you specify a solution file, nuget.exe does not respect the default behavior of checking the sln directory.

---

<div class="post-metadata">

### Author: ![peter.toms](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@peter.toms](https://www.finalbuilder.com/forums/u/peter.toms)
#### Post date: [May 23, 2014, 9:43am UTC](https://www.finalbuilder.com/forums/t/nuget-restore-question/5177/4 "2014-05-23T09:43:15Z")

</div>

Hi Geet, no problems, we have implemented this change and its scheduled for the next build (at this stage early next week). Thanks again
