NuGet.exe: List / Install - Prerelease Flag is incompatible with the Source Argument - INFORMATIONAL - Make sure you use v2 sources

Feb 17, 2012 at 4:43 PM
NuGet.exe (1.6) version 1.6.21205.9031. With NuGet 1.6, I have the ability to work with a new flag, Prerelease. Which is awesome, except it's incompatible with the source argument(s).

I can use the prerelease flag to see all prerelease items:

nuget.exe list ninject.mvc3 -Prerelease
>Ninject.MVC3 3.0.0-rc3

But if I add source to the end, check out the output:
nuget.exe list ninject.mvc3 -Prerelease -source

This is the same behavior on install.

nuget install ninject -prerelease
>Successfully installed 'Ninject 3.0.0-rc3'.

rmdir /s /q Ninject.3.0.0-rc3

nuget install ninject -prerelease -source
>Successfully installed 'Ninject'.

This is kind of a pretty big bug in my book. The workaround is that I can explicitly call out for the prerelease version with -version, but I shouldn't have to. Thoughts?
Has someone already reported this?
Feb 17, 2012 at 5:05 PM

I was wrong, there is no workaround. The use of source negates your ability to install prereleases at ALL from the command line. Huge bug.

nuget install ninject -version 3.0.0-rc3
>Successfully installed 'Ninject 3.0.0-rc3'

rmdir /s /q Ninject.3.0.0-rc3


nuget install ninject -version 3.0.0-rc3 -source
>Unable to find version '3.0.0-rc3' of package 'ninject'. 

The following works (which is good if I need a particular version of a prerelease):

nuget install ninject -version 3.0.0-rc3 -prerelease
>Successfully installed 'Ninject 3.0.0-rc3'

Feb 17, 2012 at 5:06 PM

You are using the v1 feed, which doesn't return prereleased packages for backward compat reason. Try using the v2 feed. 

Feb 17, 2012 at 5:06 PM

And then I just thought, what if that is pointing to the old v1 feed? And it is... doh!

Let me see if it is still a bug with v2, which I doubt.

Feb 17, 2012 at 5:09 PM

Hey, awesome. It's my fault. The source i was pointing to was v1. So everything is fine. No bug. Nothing to see here, move along now. 

nuget install ninject -version 3.0.0-rc3 -source

Feb 17, 2012 at 5:11 PM

I changed the discussion name for future people happening to do this same thing. :D

Feb 17, 2012 at 5:18 PM

Thanks Luan. I came to that same conclusion within moments of posting this...