Packages built with Nuget.exe v2 cannot push to an older version of the Gallery

Topics: Ecosystem
Jun 28, 2012 at 7:02 AM
Edited Jun 28, 2012 at 7:04 AM

I have a custom gallery updated to  https://github.com/NuGet/NuGetGallery/commit/90a05bc3e0580783f81ccba1153b8bafbb2af1ad

If I build a nuspec with v1.6 of NuGet.exe, I can push that to this custom source. Then I upgrade to v2 of Nuget.exe (and that is the ONLY change) and build that same nuspec, I suddenly can no longer push to the custom source.

Pushing to custom source
Failed to process request. 'The schema version of 'package' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version
from http://go.microsoft.com/fwlink/?LinkId=213942.'. The remote server returned an error: (500) Internal Server Error..

 

There is no relevant notes about this in the two locations I would expect.  

I am guessing it has something to do with "dc:title" being added to the psmdcp file.

  • https://dl.dropbox.com/u/9391884/nuget/PackageDiff1.png 
  • https://dl.dropbox.com/u/9391884/nuget/PackageDiff2.psmdcp.png
  • https://dl.dropbox.com/u/9391884/nuget/PackageDiff3.Content_Types.xml.png 
Jun 28, 2012 at 7:03 AM

Let's try the urls again:

https://dl.dropbox.com/u/9391884/nuget/PackageDiff1.png

https://dl.dropbox.com/u/9391884/nuget/PackageDiff2.psmdcp.png

https://dl.dropbox.com/u/9391884/nuget/PackageDiff3.Content_Types.xml.png

 

Jun 28, 2012 at 7:08 AM

To be perfectly honest, I kind of expect the errors to happen when the client has upgrades (so you should upgrade the server). But it would be nice to get a heads up on whether the new release of the client requires an upgrade to the server or not.  I believe I saw this same behavior with 1.5 to 1.6. 

 

That's really my only complaint. I don't expect a fix, just discussion on the Ecosystem thread.

Jun 28, 2012 at 7:10 AM

You can tell me I'm an idiot and point me to the thread I missed. Let me rephrase, I would prefer it two places, in known issues and also in the ecosystem thread.

Jun 28, 2012 at 11:36 AM

This is not expected. If you build the package with nuget.exe 2.0 but you don't use any new target framework support in 2.0, then nuget.exe will not use the new schema and the package should still be loaded by older gallery version.

If you manually delete the dc:title attribute, will it work?

Jun 28, 2012 at 3:19 PM
Edited Jun 28, 2012 at 3:20 PM

I'll need to check this later tonight.

Developer
Jun 28, 2012 at 4:48 PM

@ferventcoder, think you could attach the nupkg itself? Might be easier to figure out why it's treating it so. The dc:title isn't the cause for this error.

My guess is we're adding extra files to your package for some reason and one of them has a path that looks like a framework name. 

Jun 28, 2012 at 5:00 PM
That's an even better idea. Let me do that instead tonight.


Jun 28, 2012 at 5:18 PM

Here is an example:

https://dl.dropbox.com/u/9391884/nuget/pngoptimizer.2.1.nuget.v1.6.nupkg 

https://dl.dropbox.com/u/9391884/nuget/pngoptimizer.2.1.nuget.v2.0.nupkg

 

I noticed another difference today - the namespace for the schema was changed:

v1.6 - <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">

v2.0 - <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">

v1.6 left it as it was in the original file and v2 updated it.

Jun 28, 2012 at 5:38 PM

that looks like a bug on nuget.exe. The package doesn't have anything new which requires the new schema. I'll take a look.

Jun 28, 2012 at 5:39 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.