Why does Get-Package return nothing?

Mar 18, 2012 at 7:09 AM

I'm new to NuGet. I have MS Visual Web Developer Express 2010

If I type: Get-Package -ListAvailable

nothing happens except that the new prompt is presented.

In the drop-down, I tried Source = "All", and "Official Package Source"

Mar 18, 2012 at 2:55 PM

Add a switch to list from a remote source '-remote'.

Get-package by default only returns items from locally installed packages.

'Get-help get-package' should list out all the options (fyi, I'm on my phone and I typically forget powershell as fast as I learn it, so the command is something to the effect of the above).

Mar 19, 2012 at 3:03 AM

thanks to the response above. i am new here and i have encountered the same problem. :)

 

Credit Report Dispute

Mar 19, 2012 at 12:07 PM

Hi fayebryant00,

Can you post your complete command line please.

I've tried several combinations of "-remote", and get errors each time.

BTW:  I can't see "-remote" in the help.

Thanks.

Mar 19, 2012 at 2:54 PM

@OldGrantonian: Ignore fayebryant00, it's a spammer.

What are the package sources that you have configured? If you specify -ListAvailable switch, that's enough. Open Fiddler and observe the outgoing traffic. See if any connection is made to nuget.org.

Mar 19, 2012 at 3:34 PM
dotnetjunky wrote:

@OldGrantonian: Ignore fayebryant00, it's a spammer.

What are the package sources that you have configured? If you specify -ListAvailable switch, that's enough. Open Fiddler and observe the outgoing traffic. See if any connection is made to nuget.org.

>>  it's a spammer

That proves how dumb I am :)

The other way to prove it is to say that I don't really understand anything in your sincerely motivated response :)

I assumed that NuGet was similar to the package manager in Ubuntu. Open it, and you see all the packages that have been approved as "safe" for Ubuntu users. A simple click means that it's installed autmatically. Removal is also a single click.

Each time I want to download something related to ASP.NET (I'm not a techie), it seems that I've been offered the option of (a) downloading and installing manually, or (b) using something called NuGet.

So, I added NuGet to my MS Visual Web Developer Express 2008, Now I'm trying to figure out how to use it :)

So, here's my answers anyway.

>> What are the package sources that you have configured?

None. But in the dropdown, there are 2 options:

All

NuGet official package source

>> If you specify -ListAvailable switch, that's enough.

My OP says that's not true :)

>> Open Fiddler

Well, I googled Fiddler and saw that it's a "Web Debugging Proxy". So, if I need to do that, I might as well continue downloading manually.

But thanks anyway :)



Mar 19, 2012 at 3:39 PM

Well, I googled Fiddler and saw that it's a "Web Debugging Proxy". So, if I need to do that, I might as well continue downloading manually.

 

I think you misunderstood his point. :) Using Fiddler is not something that's needed to make NuGet work. It's a tool that can help diagnose what may be a bug so we can understand the situation and hopefully help others in the same situation.

Mar 19, 2012 at 3:59 PM

Well, because everyone is asking so nicely, here are the two lines from Fiddler that I see when I type:

PM> Get-Package -ListAvailable
PM> 

# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
10 200 HTTP packages.nuget.org /v1/FeedService.svc/Packages()/$count?$orderby=Id&$skip=0 5 no-cache text/plain;charset=utf-8 vwdexpress:3112

 

 

# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
11 200 HTTP packages.nuget.org /v1/FeedService.svc/Packages()?$orderby=Id&$skip=0 341,927 no-cache text/xml;charset=utf-8 vwdexpress:3112

 

 

What should I do now?

 

Mar 19, 2012 at 4:58 PM

Hmmm, it's definitely returning data (341,927 bytes). Can you also type $Host to get the NuGet version? e.g.

PM> $Host


Name             : Package Manager Host
Version          : 1.6.21215.9133
InstanceId       : 60d041e6-1263-4d82-b899-bd876beb4434
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : NuGetConsole.Host.PowerShell.Implementation.NuGetPSHost+Commander
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

If you have something lower, please upgrade.

Also, you may be pointing to an old feed. Go under Tools / Library Package Manager / Package Manager settings, and then on Package Sources. The Official url should be: https://go.microsoft.com/fwlink/?LinkID=230477

Mar 19, 2012 at 5:16 PM

Thanks for your interest :)

-----------------------------------------------

PM> $host

Name             : Package Manager Host
Version          : 1.2.20325.9034
InstanceId       : ca2447a7-3845-4575-871c-1e0ae308e13b
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-GB
CurrentUICulture : en-US
PrivateData      : NuGetConsole.Host.PowerShellProvider.PowerShellHostProvider+Commander
IsRunspacePushed :
Runspace         : 

Mar 19, 2012 at 5:18 PM

Yep, that's the problem! :) Just update under Tools / Extension Manager. Actually, you may need to uninstall it first due to an earlier issue.

Mar 19, 2012 at 5:47 PM

That worked fine. My version is now the same as yours. I can now see millions of packages.

Thanks for all your help :)