Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Installed packages show the package I just installed?

Tags:

.net

nuget

I've been getting started with Nuget. Some of my projects allow me to Add Library Package Reference to a Nuget package, but then when I select "Installed Packages" I don't see any packages listed. Why not?

EDIT - I know the answer (see below), was going to answer this myself as a "community service" but can't for another 8hrs due to my lame rep score.

Answer will be: The project already had a packages.config file in the same directory as the csproj file, BUT the packages.config file was not added to the project. Fixed by "Add existing item" and selecting the packages.config file.

Note: in hindsight, the pink '"packages.config" already exists, Skipping' message in the nuget progress window should have alerted me to this.

Hope this helps someone.

like image 525
dbruning Avatar asked May 31 '11 02:05

dbruning


People also ask

Where is my Python package installed?

When a package is installed globally, it's made available to all users that log into the system. Typically, that means Python and all packages will get installed to a directory under /usr/local/bin/ for a Unix-based system, or \Program Files\ for Windows.

What does the installed packages () function do?

installed. packages scans the DESCRIPTION files of each package found along lib. loc and returns a matrix of package names, library paths and version numbers.

How do you determine what packages are installed on a system?

You use the pkgchk command to check installation completeness, path name, file contents, and file attributes of a package. See pkgchk(1M) for more information on all the options. Use the pkginfo command to display information about the packages that are installed on the system.


2 Answers

(Pasted from the question, so this doesn't show up as unanswered)

The project already had a packages.config file in the same directory as the csproj file, BUT the packages.config file was not added to the project. Fixed by "Add existing item" and selecting the packages.config file.

Note: in hindsight, the pink '"packages.config" already exists, Skipping' message in the nuget progress window should have alerted me to this.

like image 165
Danny Tuppeny Avatar answered Nov 09 '22 22:11

Danny Tuppeny


In another case, the packages.config file is part of the project, but the definition of the <packages> tag was like <packages xmlns="urn:packages"> rather than the usual <packages> convention. This caused my project to neither restore nor show up any packages. This is confirmed in Visual Studio 2015. Once i remove "urn:packages" all started to work fine.

like image 36
Soundararajan Avatar answered Nov 09 '22 20:11

Soundararajan