Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which port is used by NuGet while downloading package through Visual Studio

I am using VS 2010 (Package Manager Console) to download NuGet (2.5.40416.9020/Latest) packages. It uses URL https://nuget.org/api/v2/. It gives me error as below.

Install-Package : An error occurred while loading packages from'https://nuget.org/api/v2/': The remote name could not be resolved: 'nuget.org'
At line:1 char:16
+ Install-Package <<<<  Rx-Main
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

But when i access the same URL via browser then i am able to browse the site. I am on corporate network so firewall might block the port (Other than 80 and 443).

So which port is used by NuGet while downloading packages via Package Manager Console (VS 2010)?

like image 464
vijay Avatar asked Jun 06 '13 08:06

vijay


People also ask

How do I download NuGet packages in Visual Studio?

Navigate to NuGet.org and search for the package you want to install. Select Package Manager, and then copy the Install-Package command. In Visual Studio, select Tools > NuGet Package Manager > Package Manager Console to open the package manager console.

Which command is used for downloading and installing a package from NuGet repository?

The NuGet CLI restore command downloads and installs any missing packages. The command works on projects that use either PackageReference or packages.


1 Answers

https://nuget.org/api/v2/ means port 443 (the standard port for HTTPS)

If you're on a corporate network, port 80 and 443 are usually bounced through a proxy server.

Most likely, NuGet is not using your proxy settings for some reason, so it cannot find the proxy server and are stopped by the corporate firewall.

like image 145
Joachim Isaksson Avatar answered Oct 11 '22 19:10

Joachim Isaksson