If you have multiple packageSources in your NuGet.config:
<packageSources>
<clear />
<add key="dev" value="http://server2/branches/feature1/nuget" />
<add key="release" value="http://server1/nuget" />
</packageSources>
Is the order in the XML used when running nuget install, etc? If I have packageA at version 1.0.0-SNAPSHOT in both, will the dev channel version on feature1 branch win?
Yes, the . nuget folder is used as a cache for packages downloaded to speed up project restore and compilation. It can safely be removed.
To manage your package sources, select the Settings icon or select Tools > Options. In the Options window, expand the NuGet Package Manager node and select Package Sources. To add a source, select +, edit the Name, enter the URL or path in Source, and then select Update.
The default is %userprofile%\. nuget\packages (Windows) or ~/. nuget/packages (Mac/Linux). A relative path can be used in project-specific nuget.
The order of your feeds in nuget.config determines the order that they show up in the drop down menus from the various views into NuGet from Visual Studio. In all cases, you have the choice of which feed you install from. See the screenshots below.
Visual Studio doesn't keep track of where your package came from, so the package ID is really in a global namespace that you have to know which feed it's a part of. Visual Studio will show you any package from the selected feed with a matching ID, so it's possible that you'd overwrite a package you installed from one feed with another from a different feed.
For a NuGet feed that I manage at my company, I prefix our internal packages with <CompanyName>.
so as to reduce the risk for a naming conflict now and in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With