I can exec something like -
mono --runtime=v4.0.30319 /Library/TeamCity/buildAgent/work/b0d2d3fefe88d393/.nuget/NuGet.exe' install '/Library/TeamCity/buildAgent/work/b0d2d3fefe88d393/something/packages.config' -source 'http://www.someurl.com/feed/' -RequireConsent -solutionDir '/Library/TeamCity/buildAgent/work/b0d2d3fefe88d393/'
to tell mono Nuget to look at a specific Nuget Source.
But assuming for some reason I could not modify the nuget command line call to add a -source parameter, how could I do this using a default config file as per (windows variant) -
http://docs.nuget.org/consume/command-line-reference#install-command
ConfigFile (v2.5) The NuGet configuation file. If not specified, file %AppData%\NuGet\NuGet.config is used as configuration file.
so, I can then set up "Package sources" from here -
https://docs.nuget.org/consume/nuget-config-settings
Can this approach work on the mac?
Default location of NuGet config file on OS X is in user's home directory:
~/.config/NuGet/NuGet.Config
You should be able to add <packageSources>
setting to this file according to docs.
Create the file if it doesn't exist.
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