Visual Studio 2022 won't connect to NuGet

Jayakumar R 0 Reputation points

Visual Studio 2022:

[] Unable to load the service index for source An error occurred while sending the request. The underlying connection was closed: An unexpected error occurred on a send. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host

I have attached snapshot for your reference. Error1


Microsoft Technologies based on the .NET software framework.
3,357 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,595 questions
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
{count} votes

3 answers

Sort by: Most helpful
  1. satya karki 986 Reputation points MVP

    Can you please try these steps? 1- go to %appdata%\NuGet\NuGet.config 2- Verify the urls mentioned in that config 3- Remove the url which is not required 4- Restart visual studio and check

    0 comments No comments

  2. satya karki 986 Reputation points MVP

  3. Bruce ( 55,366 Reputation points

    Most likely you are using a proxy. You can check the browser for the setting, and then configure nuget to use a proxy:

    0 comments No comments