Packages Disappearing

Topics: General
Jul 2, 2012 at 9:17 PM

When I update one of our projects, references to Log4net and Rabbit MQ disappear from the csproj and packages.config file. These two libraries are needed by our logging library. The project also has packages installed that need our logging library. We have private feed that hosts all the packages we require.

At the start, the packages.config file needs version 36 of the logging library. RabbitMQ and Log4net are version 2.8.1 and 1.2.11 and there are no updates available on our feed for these packages. 

I debugged through the command line update, and I see it updating logging to version 37 and then to version 38 (the latest version).

When it uninstalls version 36, I see it add an operation to uninstall Rabbit and log4net.

When version 37 is installed, I see it remove the uninstall of Rabbit and log4net. 

When version 37 is uninstalled, I see it add an uninstall operation for Rabbit and log4net.

When version 38 is installed, it does not remove the uninstall operation.

I think it has something to do with the Marker. Specifically:

public void Walk(IPackage package)       


// Do nothing if we saw this package already           

if (Marker.IsVisited(package))           








When it gets to the Rabbit MQ/log4net reference, Marker.IsVisited is true and the uninstall is not removed. If I break on this and drag the cursor outside of the if statement and run the rest of the code, the Rabbit MQ / log4net uninstall operation is correctly removed.

This happens if I do a command line Install followed by an Update. It also happens if I use the Package Restore feature and then run the command line update.

It would seem the marker logic needs to be tweaked to remove the uninstall operation or the marker interaction on the uninstall side (InstallWalker.Uninstall method) needs to be tweaked to not add the uninstall operation. 

This is a significant problem for our CI as it causes many builds to fail since references were removed by NuGet.

Any help is appreciated!