NuGet Package Explorer - Export doesn't work anymore

May 3, 2011 at 9:14 AM

I've got around 50 packages that I need to export into folders using package explorer.. I opened the first package, hit export, chose the folder, everything worked - wonderful. I opened the second package, and Package Explorer automically updated itself, fine. I then tried to export the next package and got hit with an error "Value cannot be null. Parameter name: path2". I tried the next package, same problem, I tried the first package again, same problem :(

I can only assume the update has broken this functionality (just when I need it, typical!) Is there any way I can regress back to the old version?

May 3, 2011 at 12:19 PM

Well I downloaded the source code and added in this nasty hack to fix the problem. Not suggesting this as a patch but if anyone else needs a quick workaround here's the amended method in PackageFolder.cs

public override void Export(string rootPath) {
            //xstring fullPath = System.IO.Path.Combine(rootPath, Path);
            // HACK raaargh!
            string fullPath = Path != null ? System.IO.Path.Combine(rootPath, Path) : rootPath;
            if (!Directory.Exists(fullPath)) {

            foreach (var part in Children) {

May 3, 2011 at 2:09 PM

Thanks for reporting. I confirm that this is a regression from 1.0. I have fixed it and uploaded a new build (after vigorous testing, of course ;-). You can update Package Explorer through ClickOnce to see the fix.