Single Package Version per Solution

nuget, code, open source 0 comments suggest edit

Not too long ago, I posted a survey on my blog asking a set of questions meant to gather information that would help the NuGet team make a decision about a rather deep change.

You can see the results of the survey here.

If there’s one question that got to the heart of the matter, it’s this one.


We’re considering a feature that would only allow a single package version per solution. As you can see by the response to the question, that would fit what most people need just fine, though there are a small number of folks that might run into problems with this behavior.

One variant of this idea would allow multiple package versions if the package doesn’t contain any assemblies (for example, a JavaScript package like jQuery).

Thanks again for filling out the survey. We think we have a pretty good idea of how to proceed at this point, but there’s always room for more feedback. If you want to provide more feedback on this proposed change, please review the spec here and post your thoughts in our discussion forum in the thread dedicated to this change.

The spec describes what pain point we’re trying to solve and shows a few examples of how the behavior change would affect common scenarios, so it’s worth taking a look at.

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.



4 responses

  1. Avatar for Alexander DiMauro
    Alexander DiMauro May 2nd, 2011

    One of the features of NuGet is that, if a package depends on another, it automatically downloads all the dependencies. But, an issue I ran into was when a package has a dependency on an older version of another package.
    One example is NUnit.Should. I installed it, and it also installed NUnit, its dependency. But, it installed the latest version (2.5.10), not the version it depends on (2.5.9). I had to uninstall 2.5.10, then go back and install to get it to work.
    Shouldn't there be a way to tag the correct version of a dependency so NuGet will get that one instead of the latest?

  2. Avatar for haacked
    haacked May 3rd, 2011

    A package can define an exact match. But typically they don't. By default, when you specify version="1.0", you're specifying a min version.

  3. Avatar for Claire
    Claire May 4th, 2011

    I'm trying to think of a plausible instance during which I'd need different versions of an assembly within a single solution, and I really can't think of one. I guess it depends on what you want to do, but I think your idea of idea allowing multiple package versions if the package doesn’t contain any assemblies seems like a safe way to play it. I'm excited to use the end result!

  4. Avatar for Matt
    Matt May 5th, 2011

    I was talking with a fellow dev yesterday about this and we agreed that the ability to add a single dependency to an entire solution would simplify things greatly. This would encourage NuGet adoption ever further.
    Thanks for the post on this!