removal of old packages

Nov 7, 2010 at 6:56 PM

I tried the following:

Install-Package TestVersion

this install version of TestVersion

now I create a new version of TestVersion (

Update-Package TestVersion

installs version of TestVersion

but when I look at the packages directory of my solution, TestVersion. folder still exists (although no other packages depend on this  and no projects have the older version installed).

Shouldn't it remove the folder TestVersion. or is there a good reason for not doing so?

Secondly, Project A has a reference to Project B
TestVersion is installed in A
TestVersion is installed in B

It does not update reference in Project A, is there a way to make all projects automatically reference 

Nov 7, 2010 at 7:17 PM

For your first question, it should do that. Please file a bug.

For you second question, we don't have an update all command but you can do:  

Get-ProjectNames | %{ Update-Package somepackage -Project $_ }

Nov 7, 2010 at 7:25 PM

Bug filed.
The update-package for all projects works fine! 

Nov 7, 2010 at 8:49 PM

Even though updating all projects work, I think there are some cases where we're not doing the right thing when we're getting references indirectly into a web app via a library project that it uses.  We should discuss this topic some more.  Generally, I think we're not spending enough time testing those indirect reference scenarios.

Nov 7, 2010 at 9:02 PM

Yeah, I haven't done a lot of testing around that scenario, and what I have done was quite some time ago. I'll make time to spend on that before the next release.

Nov 8, 2010 at 12:34 PM

Also, why do you put the .nupkg files inside the packages directory of the solution? The .nupkg gets fully extracted inside the packages directory, so I guess there is no need of keeping it as well.


Nov 8, 2010 at 4:35 PM

When you uninstall a package, we don't want to remove any files that you may have modified. The easiest way to do that was to keep the package around so we can compare each file in the package with the one in your project and only remove ones that you haven't modified.

There are other ways we could have done this, but this was the most convenient at the time. It has the added benefit that it makes it very easy for you to grab the packages and create your own local package feed. :)

Nov 9, 2010 at 7:30 AM

I hope you don't apply that to files inside lib, but I can understand it for content.... 
This means the packages .nupkg should go in source control as well.