Latest drop of nuget extension is ignoring already installed packages for the solution/projects

Mar 8, 2013 at 6:32 PM
I'm trying to run say

install-project automapper

And I already have automapper installed in other projects for this solution. Nuget in it's smartness is just ignoring that fact and installing the latest version on this project. This could affect multiple versions back, I just haven't done this in awhile.

Expected behavior (and how it's worked in the past):
Reference the existing package, and perform other install operations against the project on that existing package. Don't try to go get a new one.


Mar 13, 2013 at 12:56 AM
Edited Mar 13, 2013 at 12:56 AM
Hi Rob,

Install-Package does have a -Version switch. Is this something you can use to get the behavior you want?

Mar 13, 2013 at 4:04 AM
Edited Mar 13, 2013 at 4:13 AM
Hi Clay. Of course that's a workaround that I can use. Would you agree that it is unexpected behavior though? Especially since earlier versions worked appropriately...
Mar 13, 2013 at 5:32 AM
I wasn't aware that NuGet didn't try to get the latest version in the past. If it behaved that way, maybe it was accidental. I know our intention is always to install the latest version if you don't explicitly set the -Version parameter.

I can see valid reasons for both behaviors though.
Mar 13, 2013 at 6:14 AM
So what you are saying is that IF I already have AutoMapper v 2.0.0 installed in OTHER projects in the solution, you are going to install 2.1.0 into a newly added project to the solution instead of using the already installed v 2.0.0? This doesn't try to upgrade already installed version on the other projects so this would effectively create multiple versions of AutoMapper against one solution. This behavior was was fixed back in v1.4 because it was bad...

I can't find my original discussion because it is private and I no longer see those, but if you remember the feature was called Single Package Version Per Solution: |
Mar 13, 2013 at 5:52 PM
Hi, I have opened the discussion to public. You can view it now. :)

I remember we had a discussion back then, but I don't remember we ever fixed it. I'll ask the few members of the team to see if we ever did it.
Mar 13, 2013 at 8:52 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 13, 2013 at 9:09 PM
I don't think we will want to do this.
Mar 13, 2013 at 10:13 PM
It was working, that's the thing. And if you ask a group of people how they would like it to work when they install the same package in several projects under the same solution, they will want it to be the same version they installed in the first project unless they specifically ask for a different version, or attempt to install something that requires a different version.

This is such a slam dunk from a usability standpoint I don't get what the hesitation is. Perhaps it is that I'm not really explaining it correctly?

"Be passionate in all you do"
Mar 13, 2013 at 11:06 PM
Do you remember what version it was working? I asked David Ebbo and he said it never worked that way before. I myself don't remember such behavior either.
Mar 13, 2013 at 11:07 PM
If you want to install the same version of a package to other projects, you can use the Solution-level dialog, open the Installed tab and click Manager button next to the package.
Mar 14, 2013 at 12:35 AM
That might have been how I did it in the past... :)

Feel free to lower the priority of this item. I still think it has some merit though from a usability standpoint.

"Be passionate in all you do"