Avatar of Peter Chan
Peter Chan
Flag for Hong Kong asked on

Problem to install package

Dear,
Any help to this problem?
31h.png
ASP.NETASP.NET ProgrammingProgramming Languages-OtherMicrosoft Visual Studio

Avatar of undefined
Last Comment
it_saige

8/22/2022 - Mon
it_saige

Make sure that you have internet access and verify your package source.Capture.PNG-saige-
David Favor

If you look closely at the error message you posted, you'll see that www.nugent.org could not be resolved.

You may have other problems to resolve + your question relates to a pure DNS issue.

I see...

imac> dig +short www.nugent.org a
64.99.80.121

Open in new window


So... one of two possibilities... Your internal caching DNS is flakey/glitchy (tech term for works sometimes, fails sometimes)...

Or... nugent.org DNS is flakey/glitchy...

A temp work around, is to add a record for nugent.org + www.nugent.org to your /etc/hosts file + finish your install + remove the /etc/hosts entry (because leaving a perpetual hard coded DNS entry is a very bad idea).
Peter Chan

ASKER
Thanks to all.
David,
Sorry to that I've put this line

       64.99.80.121    www.nugent.org              # x client host

Open in new window

in hosts file (and then have rebooted the server), but I still get this error

PM> install-package MaxMind.MinFraud
Install-Package : The remote name could not be resolved: 'www.nuget.org'
At line:1 char:16
+ install-package <<<<  MaxMind.MinFraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
David Johnson, CD

try from a browser to connect to www.nuget.org until you can do this add-package will not work.
Peter Chan

ASKER
I have no problem to get into

https://www.nuget.org/

(on the server). But I am still getting this problem.
PM> install-package MaxMind.MinFraud
Install-Package : The remote name could not be resolved: 'www.nuget.org'
At line:1 char:16
+ install-package <<<<  MaxMind.MinFraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
PM> 

Open in new window

it_saige

Did you verify your package source?

-saige-
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Peter Chan

ASKER
What to verify? How to resolve the current error?
David Favor

Verify your DNS resolution is working, so us dig/nslookup to verify your DNS is working, ping the site to ensure packets are flowing (which might fail if site blocks ICMP traffic), then visit via browser, as David Johnson suggested.

Tip: Always imagine everything is broken + start debugging at the lowest common denominator.
Peter Chan

ASKER
I get the below, on the server
C:\Users\Administrator>ping www.nugent.org

Pinging www.nugent.org [64.99.80.121] with 32 bytes of data:
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241

Ping statistics for 64.99.80.121:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 255ms, Maximum = 255ms, Average = 255ms

Open in new window

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
David Johnson, CD

Which version of visual studio are you using?
You may have to update nuget client from tools updates
Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 4.7.0.5212

Type 'get-help NuGet' to see all available NuGet commands.

PM> install-package maxmind.minfraud


Attempting to gather dependency information for package 'maxmind.minfraud.2.0.0' with respect to project 'ee29114555', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 2.68 sec
Attempting to resolve dependencies for package 'maxmind.minfraud.2.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'maxmind.minfraud.2.0.0'
Resolved actions to install package 'maxmind.minfraud.2.0.0'
Retrieving package 'MaxMind.Db 2.4.0' from 'nuget.org'.
Retrieving package 'MaxMind.GeoIP2 3.0.0' from 'nuget.org'.
Retrieving package 'MaxMind.MinFraud 2.0.0' from 'nuget.org'.
Retrieving package 'Microsoft.CSharp 4.4.1' from 'nuget.org'.
Retrieving package 'Newtonsoft.Json 11.0.2' from 'nuget.org'.
Retrieving package 'System.ComponentModel.Annotations 4.4.1' from 'nuget.org'.
  GET 

Open in new window

Peter Chan

ASKER
I'm using VS 2013 and here is what I've got

PM> install-package MaxMind.MinFraud
Install-Package : The remote name could not be resolved: 'www.nuget.org'
At line:1 char:16
+ install-package <<<<  MaxMind.MinFraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
PM> install-package maxmind.minfraud
Install-Package : Object reference not set to an instance of an object.
At line:1 char:16
+ install-package <<<<  maxmind.minfraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], NullReferenceException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
PM> 

Open in new window

it_saige

In VS 2013, to verify the package source.

Go to TOOLS -> NuGet Package Manager -> Package Manager Settings:Capture.PNGIn the Options dialog, select Package Sources and verify that your nuget.org package source matches one of the two following urls:

V2 - https://www.nuget.org/api/v2/
V3 - https://api.nuget.org/v3/index.json

NOTE - Note that the V2 API is deprecated and does not work with NuGet 4+.

https://docs.microsoft.com/en-us/nuget/policies/nuget-faq#nugetorg-not-accessible

-saige-
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
David Johnson, CD

since v2 is no longer functional.. is there a solid reason why you are not using visual studio 2017?  (community edition is free)
Peter Chan

ASKER
Saige,
What to adjust, due to the below problem (it does keep waiting)?
31j.pngDavid,
I want to resolve problem in VS 2013.
ASKER CERTIFIED SOLUTION
it_saige

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.