Nuget Package-Restore and VS extension releases not in sync?

Topics: General
Oct 15, 2012 at 6:14 PM

Nuget Version:
nuget.exe installed via package-restore: v2.0.30828.5
vs extension: v2.0.30717.9005

I have a common repository folder set for all of my projects (..\..\packages). This was being accomplished by editing the nuget.exe.targets file like so:
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "..\..\packages"))</PackagesDir>

And placed a nuget.config file next to my solution file with:
<settings> <repositoryPath>..\..\packages\</repositoryPath> </settings> 

I tried upgrading to 2.1 release and re-doing the Enable Package-Restore by deleting the old .nuget folder and right-clicking my solution file again. This attempt failed in different ways... first it would restore packages to the root of the solution folder instead of ..\..\packages, even after setting the new config for nuget.config:
<configuration> <config> <add key=" repositoryPath" value="..\..\packages\" /> </config></configuration> 
At some point i'd see the command would exit with code 1. I also had some instances where Nuget Package extension would allow me to click the "restore" button but then would fail without info about why it failed.

At first I had tried it by upgrading package-restore files without upgrading my VS extension to 2.1... then i also upgraded the vs extension and it still didn't work.

Now i've reverted to the configuration specified at the top of this post until i can figure out how to upgrade to 2.1. Though now when i do right-click solution and Manage solution packages, vs2012 hangs with a screen "loading project 1 of x" at least i can still right-click on each project and look at packages.

My understanding was that even if i uninstall the Nuget extension entirely, the package-restore commands should still work... is this not correct?

Finally, the repositories.config file, shouldn't this be stored somewhere next to the solution file instead of at the location of the repositories root? Since i use the same root for several solutions, this file includes references to packages on each project for every solution.

Thank you!

Oct 18, 2012 at 6:36 PM

@diegohb is it possible you could share your project (may be a trimmed down repro and share it by opening an issue on issue tracker).  You might have already tried it but wanted to see if closing and reopening your solution helps to pick the new repositorypath settings?  thanks