Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the NuGet packages.config file?

I see a packages.config file for each of my projects in a solution. It contains info about various assemblies info. I am expecting that the NuGet will automatically scan these packages.config and download as necessary. But it didn't. Do I need to manually install all the packages?

like image 222
smwikipedia Avatar asked Jul 03 '14 14:07

smwikipedia


People also ask

What is the use of NuGet config file?

The NuGetDefaults. Config file exists to specify package sources from which packages are installed and updated, and to control the default target for publishing packages with nuget push .

What is the use of packages config?

The packages. config file is used in some project types to maintain the list of packages referenced by the project. This allows NuGet to easily restore the project's dependencies when the project is to be transported to a different machine, such as a build server, without all those packages. If used, packages.

Where does the NuGet config file go?

The NuGet Visual Studio extension, the NuGet Package Manager Console, and the NuGet command-line tool all make use of the NuGet configuration file, which by default is located under %AppData%\NuGet\NuGet. config.


1 Answers

If you right click the project in question you can select "Manage nuGet Packages" from the menu. After you do that you can click "installed packages" on the left hand side to see the packages that you currently have installed. These are what you are seeing in your "packages.config" file. If you wish to update the packages or reinstall them you can do that through the interface here by clicking "uninstall", then finding them in the list an re-installing them again.

Alternatively you can use the package manager console to do things like updating, installing older versions or all sorts of things with the nuget manager. See here for some details about that. (Information about updating a package is at the bottom of the page).

Best of luck!

like image 74
drew_w Avatar answered Oct 04 '22 19:10

drew_w