Made RemoveUnnecessaryPackages consistent by igor84 · Pull Request #696 · GlitchEnzo/NuGetForUnity (original) (raw)
In the old code it would look for nuspec files on the file system and then remove folders that are not in packages.config. But installedPackages already contain all found nuspec files. The issue with old code is that InstalledPackages contained data about packages that were also potentially modified by the plugins while this method didn't take that into account leading to inconsistencies.