Visual Studio reads NuGet.Config files from the solution root. Try moving it there instead of placing it in the same folder as the project.
You can also place the file at %appdata%\NuGet\NuGet.Config
and it will be used everywhere.
https://docs.microsoft.com/en-us/nuget/schema/nuget-config-file