Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

globalPackagesFolder repositoryPath difference

Tags:

nuget

According to globalPackagesFolder NuGet Documentation, it allows you to change the location of the default global packages folder instead of Users{username}.nuget\packages. So, I figure out it's where packages are stored.

By other hand, repositoryPath NuGet Documentation, it allows you to install the NuGet packages in the specified folder.

I don't understand what this documentation is treating to say.

Could anybody exaplin me which's each one for?

like image 460
Jordi Avatar asked Oct 07 '16 10:10

Jordi


People also ask

How can I change package location?

If eligible, you can submit your request online after logging in with your USPS.com account. After submitting your request, you'll be provided an estimated total (intercept fee plus estimated Priority Mail® postage, if applicable). We will then attempt to intercept and redirect the shipment.

What is the .NuGet folder?

The global-packages folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the PackageReference format always use packages directly from this folder.

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 .


2 Answers

The globalPackagesFolder is a global cache of NuGet packages. This is where NuGet downloads NuGet packages to as a machine cache. NuGet may clean out the cache when too many packages are stored here.

The repositoryPath is the packages directory a solution will use, when using a packages.config file. It is usually a path relative to the solution. It can however be a global folder on your machine but typically it would not be the same as NuGet's global machine cache.

like image 126
Matt Ward Avatar answered Sep 22 '22 10:09

Matt Ward


As it stands today, it seems the two settings do the same, but globalPackagesFolder has to be used for projects using PackageReference, repositoryPath is for projects using packages.config.

like image 23
tm1 Avatar answered Sep 18 '22 10:09

tm1