How to I specify a NuGet package comes from an external source in packages.config? -
i working on project has dependency on nuget project on external source. using package restore , not committing packages git. developers not have source configured in nuget settings, there way specify in packages.config file package should pulled different source?
e.g.,
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="antlr" version="3.4.1.9004" targetframework="net45" /> <package id="bootstrap" version="3.0.0" targetframework="net45" /> ... <!-- how specify custom package comes different source? --> <package id="mycustompackage" version="1.0.0" targetframework="net45" /> ... <package id="respond" version="1.2.0" targetframework="net45" /> <package id="webgrease" version="1.5.2" targetframework="net45" /> </packages>
each user can have own config file, can specify location of sources:
<packagesources> <add key="nuget official package source" value="https://nuget.org/api/v2/" /> <add key="testsource" value="c:\temp" /> </packagesources>
for more info, see docs here
you can configure @ project or solution level adding nuget.config project or solution.
Comments
Post a Comment