My NuGet package manager cannot save new or find existing package sources.
The location where the package sources are saved %appdata%\NuGet\nuget.config is not getting updated since the problem started. Deleting it does not re-create it when I try adding a new package source through the Visual Studio -> Package Manager Sources dialog.
"Package Manager sources" dialog always shows empty on trying to save something and re-opening the dialog.
This problem started on my laptop after changing my corporate password from my office desktop computer (which does not have this issue).
Re-installing "Nuget Package Manager" did not help. Re-installing Visual Studio did not help.
The location of the default global packages folder. The default is %userprofile%\. nuget\packages (Windows) or ~/. nuget/packages (Mac/Linux).
Set up Visual StudioIn Visual Studio, select Tools, and then select Options. Select NuGet Package Manager, and then select Package Sources. Enter the feed's Name and Source URL, and then select the green (+) sign to add a new package source.
If used, packages. config must be located in a project root. It's automatically created when the first NuGet operation is run, but can also be created manually before running any commands such as nuget restore . Projects that use PackageReference do not use packages.
My problem is fixed :)
The step of deleting %appdata%\NuGet\nuget.config may have helped along with other steps.
Restarting Visual Studio re-generated this file with nuget.org package source added. I am almost sure I had tried this before but it had not worked before. The only other major difference was that I was not connected to corporate VPN network when restarting Visual Studio.
After searching everywhere, doesn't look like anyone has faced (or at-least asked) this issue. Hope this posting helps someone 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