Adding reference to project level

Topics: General
Nov 7, 2012 at 4:30 PM

Hi,

I have a solution containing several .csproj. I want to install a custom package into one of the project into my solution  as describe in the section "Managing installed packages" in this page http://docs.nuget.org/docs/start-here/managing-nuget-packages-using-the-dialog

1. In the package manager (at solution level), i installed the package. It seems to be ok, the package is in the "Installed tab" and is present in the "packages" directory. But, in the installed tab (always at solution level), only the button "Uninstall" is there.

2. If I try to install the package at project level with package manager, I found my package into the "Online tab" and even if i click "Install" nothing append. I see the message "package already installed" into the popup, and the green icon don't appear and the "Install" button stay there. No reference is adding to the project.

3. I tried to create manually the "packages.config" to the project level. In this case, the button "Manage" appear into the manager at solution level but even if I check the project, no reference is add.

Somebody can help me? Thanks

Nov 7, 2012 at 6:08 PM

Well im just starting with this, but had something similar, what i do is, go to Solution Level Packets Manager and make all unchecked, accept it, this should remove the Solution Level stuff, then go to the project and add the packages at project level, should work as expected...

My guess...

Nov 7, 2012 at 7:02 PM

Thank you for your help. I tried your solution but its not working for me.

If I make all unchecked, the manager seem to work few seconds and close and when I open it again the same package is mark install (it seem to be installed for the solution where I created a "packages.config" manually)

If I try to check all, I see the message "already installed" and when I open the manager, the package is mark install again only for the project where I created the packages.config.

If I delete the packages.config in the project, I came back to the first point : In the manager at solution level, the package is installed and I lost the "Manage" button. I only have "Uninstall" button.

It's like nuget is unable to create or modify a file somewhere even if all is checked out in TFS

Thank you

Nov 8, 2012 at 3:24 PM

Hi,

Can you check if the repositories.config file under packages folder is checked out ? We had a bug where it doesn't get checked-out automatically and it is fixed in 2.2.

Couple of details :

1. Which version of Nuget are you using ?

2. Would you mind sharing the package ?

I shall try for a local repro and get back to you.

 

Thanks

Bhuva