Reputation: 60664
I'm trying to install a couple of packages into my solution, and I need to reference some of them in more than one project. I've seen this question, which covers doing that using the console.
However, I would like there to be a way to do this via the GUI. I like the "Add Library Package reference..." dialog, so I'll probably continue using it for adding the first reference to the package, and I don't want to have to install packages in different ways depending on if it's the first or third time in the solution...
So, is there a way to add a reference to an already installed package from the "Add Library Package reference..." dialog?
Upvotes: 1
Views: 3103
Reputation: 60664
After re-installing NuGet a couple of times (sigh...) to solve other problems I had (specifically, the package manager console crashing on open) it suddenly started to work. The "Add Package Library Reference" dialog now gives me an "Install" button when I want to add a reference to the second project in a solution.
One key gotcha here is that the "Installed packages" are per project, and not per solution. This means that if I install Moq into Project1 and go to Project2 to do the same, it's not listed under installed packages. In the list of recent packages, however, it's included in the list and has an install button, which does exactly what I want to do: reference the same assembly in the second project.
Upvotes: 1
Reputation: 3854
One thinks it should be as easy as selecting the project from a drop-down (as in the console) or at least by right-clicking "references->Add Package Library reference" on the specific project, but, unfotrunately, that isn't the case, and there doesn't seem to be something to work around it :(
I think one should fire a feature request or something on this in their issue tracker.
Upvotes: 0