🌐 Documentation is currently available in English only. We're working on translations.

Home / Docs / NuGet Guide / Visual Studio Setup

Visual Studio Setup

Configure Visual Studio to use NugetHosting as a package source.

⏱️ 5 min read

Add Package Source

Follow these steps to add NugetHosting as a package source in Visual Studio:

  1. Open Visual Studio
  2. Go to Tools → NuGet Package Manager → Package Manager Settings
  3. Select Package Sources in the left panel
  4. Click the + (green plus) button to add a new source
  5. Configure the new source:
    • Name: NugetHosting
    • Source: https://nuget.nugethosting.com/v3/index.json
  6. Click Update, then OK
https://nuget.nugethosting.com/v3/index.json

💡 Tip: You can have both nuget.org and NugetHosting as sources. Visual Studio will search both.

Configure Credentials

Visual Studio will prompt for credentials when accessing private feeds. Use:

Username: api
Password: YOUR_API_TOKEN

⚠️ Important: Check "Remember password" to avoid re-entering credentials every time.

Alternative: NuGet.config

For team projects, use a NuGet.config file in your solution root:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="NugetHosting" value="https://nuget.nugethosting.com/v3/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <NugetHosting>
      <add key="Username" value="api" />
      <add key="ClearTextPassword" value="%NUGET_TOKEN%" />
    </NugetHosting>
  </packageSourceCredentials>
</configuration>

Browse Packages

To browse your private packages:

  1. Right-click your project in Solution Explorer
  2. Select Manage NuGet Packages...
  3. In the Package Source dropdown (top right), select NugetHosting
  4. Browse or search for your packages

✅ Tip: Select "All" as the package source to search both nuget.org and your private feed simultaneously.

Install Packages

Install packages using the Package Manager Console:

Install-Package MyPrivatePackage -Source NugetHosting

Or with a specific version:

Install-Package MyPrivatePackage -Version 1.2.3 -Source NugetHosting

Troubleshooting

"Unable to load the service index"

  • Verify the source URL is correct
  • Check your internet connection
  • Ensure your API token is valid

"401 Unauthorized"

  • Your token may be expired - generate a new one
  • Ensure the token has nuget:pull scope
  • Clear cached credentials: Tools → Options → NuGet → Clear All NuGet Cache(s)

"Package not found"

  • Verify you're searching the correct package source
  • Check if the package exists in your dashboard
  • Ensure the package version you're looking for is listed

Credentials not saving

  • Check that Windows Credential Manager is working
  • Try using a NuGet.config file instead
  • Run Visual Studio as Administrator (one-time only)
Was this page helpful?