Here is a package that has no prereleases - http://nuget.org/api/v2/package/roundhouse/
The api downloads the latest version of the feed.
Here is a package that has a prerelease as the latest version - http://nuget.org/api/v2/package/chocolatey/
The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted.
This behavior is the same on v1 version of the feed.
I haven't had a chance to dive into the code yet.
If you put the version in the end, the download works fine...
@ferventcoder So, the download link intentionally does not include pre-releases unless you specify the version (we figure without the version, you want the latest stable version). There was a bug where were doing something that made EF angry, and it turns out we shouldn't have, and it only manifested after getting a pre-release package and then performing a write (in this case, adding the download record).
So, the bug will be fixed in preview tomorrow (and I'll probably deploy to production tomorrow, too), but the behavior will be you'll get the latest stable, not the latest if the latest is pre-release. That make sense?
That's exactly what I'd expect. The latest stable package.