[Bug] If latest package version is prerelease, download url for latest version fails with error #417

ferventcoder opened this Issue Feb 18, 2012 · 4 comments


None yet
2 participants

ferventcoder commented Feb 18, 2012

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.


ferventcoder commented Feb 18, 2012

I haven't had a chance to dive into the code yet.


ferventcoder commented Feb 18, 2012

If you put the version in the end, the download works fine...

half-ogre was assigned Feb 20, 2012

half-ogre closed this in 04f50d7 Feb 21, 2012


half-ogre commented Feb 21, 2012

@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?


ferventcoder commented Feb 21, 2012

That's exactly what I'd expect. The latest stable package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment