Package Restore and Custom Feeds as of 1.6

Jan 31, 2012 at 5:46 PM

We started using NuGet Package Restore in 1.5 and it was glorious!

Today I tried to add Nuget Package Restore to a new project with 1.6 and was riddled with errors trying to restore packages from our custom feed.

6 hours later I realized that a new parameter was added to targets RestorePackages and BuildPackage called WorkingDirectory="$(NuGetToolsPath)".

This new config that I'm forced to be pointed at doesn't have my custom feed information and therefore will never be able to restore my packages.

What are the benefits of using a static config instead of the global config that we came to know and love?

Jan 31, 2012 at 5:51 PM

Sorry, that was my mistake. For existing solutions, please delete that WorkingDirectory properties manually from the .targets. We have corrected the issue and it won't happen when you enable Package Restore for new solutions.

Jan 31, 2012 at 6:01 PM

Any ETA for that bug fix going live?

Jan 31, 2012 at 6:14 PM

It's already live.

Jan 31, 2012 at 6:15 PM

To be clear, the fix doesn't involve change NuGet. We only needed to update the NuGet.Build package. Package Restore downloads this package when you enable it.

Jan 31, 2012 at 10:03 PM

I'm not getting the new file.

I created a new project and clicked "Nuget Package Restore" and it downloads the same file that has the WorkingDirectory.

I cleared my IE cached and tried again - same result.

Jan 31, 2012 at 10:10 PM

Oh, you may need to clear your nuget cache. Go to Tools - Options - Package Manager - Clear Machine Cache.

Jan 31, 2012 at 10:16 PM

I tried that and confirmed that the folder was empty.

Tried again - Same result.

Jan 31, 2012 at 10:22 PM

Can you open Fiddler and see what reponses come back when you enable package restore? Did you see it download NuGet.Build package?

Jan 31, 2012 at 10:26 PM
Edited Feb 1, 2012 at 5:49 PM

EDIT : Removed response string 1

Jan 31, 2012 at 10:26 PM
Edited Feb 1, 2012 at 5:49 PM

EDIT : Removed response string 2

Jan 31, 2012 at 11:21 PM

OK, try again. It should work now. I've updated the NuGet.Build package for real this time.

Jan 31, 2012 at 11:26 PM

Can you edit your last two posts and delete the huge response contents? We don't need them anymore.

Feb 1, 2012 at 5:48 PM

Yup it's working now thanks!