NuGet Config in Mac

The path for config file is “/Users/YourUserAccount/.config/NuGet/NuGet.Config”, recorded here for further use.



I encountered with a NuGet cannot connect with source error, some answers in Github issue and Stackoverflow pointed out NuGet use proxy to speed up access to packages, unfortunately, many answers seem to require prerequisites to understand. I instead updated my vs2017 to vs2019, everything solved.

connection error shows in package console
connection error shows in package management window


After I updated to vs2019, my project’s dependencies had been automatically restored, also indicate the path of NuGet.Config, below is the content:

I surmise that this file has been changed after update, so I couldn’t see how it configured in previous version, however we can make a suppose here that previous value for key=”nuget.org” probably pointed to a proxy by default.



Below is a link officially provided by Microsoft, I kind of fully understand it after I made this summary:

http://skolima.blogspot.com/2012/07/nuget-proxy-settings.html

Leave a Reply

Your email address will not be published. Required fields are marked *