You may be facing this issue when working with recently installed Visual Studio.
By default, Visual Studio comes with only one source of NuGet package, which is Microsoft Visual Studio Offline Packages. See below picture.
To fix this issue, just add one more NuGet package source with below values.
- Name: nuget.org
- Source: https://api.nuget.org/v3/index.json
That's all :)