- You registered NuGet feed in NuGet.config by running nuget sources add -name [YourPackageSourceName] -sourcehttps://www.myget.org/F/[YourFeedName]/api/v3/index.json -username [YourName] -password [YourPassword]
- You still get authentication prompts in Visual Studio
Visual Studio's NuGet client is notoriously bad at remembering credentials, even when you tell it to remember credentials. That said, the above approach should work.
- Try restarting Visual Studio. It does not always auto-refresh NuGet.config automatically and an IDE restart is a good approach of resolving that.
- If [YourPackageSourceName] contains any non-alphanumeric characters, some versions of the NuGet client in Visual Studio will ignore it.
- Remember that NuGet only uses username/password for authentication while searching and installing packages. If you have used a similar command as the above but only stored the API key, the client will not have enough information to authenticate against your feed.
- If documentation says "username", we do really mean username. An e-mail address on MyGet is never a valid username.
- In Visual Studio 2017, you could check our credential provider instead to make authentication in Visual Studio easier.