Steve Fenton

Stop Visual Studio prompting for NuGet feed credentials

With the imminent arrival of Visual Studio Online Package Manager, which lets us host NuGet (and other) packages on our Visual Studio Online account, it is almost certain that you are going to lose the plot when managing NuGet packages in Visual Studio and keep getting prompted for your account details (especially as the “Remember Credentials” tick box is just there to upset you).

If you head to the folder:


…you can add the following to the NuGet.config file.

      <add key="Username" value="\bob.example" />
      <add key="ClearTextPassword" value="secret" />

You can also secure this by adding the credentials via NuGet.exe – in which case the password will be encrypted.

Nuget.exe Sources Add -Name YourFeedName -UserName\bob.example -Password secret

Written by Steve Fenton on