NuGet GW2.NET Items package fails to update because of dependencies


The "GW2.NET Items" package was updated on NuGet, but an upgrade install fails because of a missed dependency on GW2NET.Core at v.1.0.1

The GW2NET.Core package published on NuGet is version 1.0.1, but the internal assembly being installed by that version is 1.0.0, hence the update fails.

Specific error is as follows:
Updating 'GW2NET.V2.Items 1.0.1' to 'GW2NET.V2.Items 1.1.0' failed. Unable to find a version of 'GW2NET' that is compatible with 'GW2NET.V2.Items 1.1.0'.

It appears the version number of the GW2NET.Core assembly needs to be incremented to fix this problem. Publishing single dependent NuGet updates without repacking the whole set often leads to this problem (I've seen it before).

I can build from source to get the update for now, but wanted to let you all know.


StevenLiekens wrote Jul 4, 2015 at 2:43 PM

Thanks for the issue report. The error that you see is generated by nuget, so something is wrong with the package's configuration. The problem is most likely that the new package is too strict about its dependencies (trying to find a Core pkg with only the exact same version).

OperatorOverload wrote Jul 4, 2015 at 3:32 PM

That's correct, though it appears the root cause is the GW2NET.Core version 1.0.1 package is shipping the GW2NET.Core version 1.0.0 assembly. Thus when Items requires 1.0.1, it fails. If it's compatible with 1.0.0 then it could be fixed in Items only by changing the Items dependency to ">= 1.0.0" rather than "=1.0.1"

At the core though, I suspect that perhaps a better answer is to re-publish Core and increment the version number of the assembly to match the package, as that would be a reasonable expectation from most folks.

I rebuilt all of it from SVN against my local NuGet repo and it seems to work as expected, so I think it's just a package repository issue.

StevenLiekens wrote Jul 4, 2015 at 5:18 PM

It doesn't quite work like that. The assembly version is fine even though it's different from the package version. The .NET runtime has no problem mixing 1.0.0 and 1.1.0 assemblies. It's just the NuGet package that was probably (mis)configured to be very strict about what Core package version to look for. This has to be fixed in the .nuspec file of the V2.Items package.

StevenLiekens wrote Jul 4, 2015 at 5:22 PM

On second thought, it's looking like all packages will have to be updated because of how overly strict the versioning rules are in these packages.

OperatorOverload wrote Jul 4, 2015 at 6:12 PM

Yeah, sorry, that's basically what I was saying (and tested out to work), just wasn't clear on my terminology. I think a combination of more flexible version dependencies and making sure that assemblies get incremented to match the packages (most are, but GW2NET.Core package 1.0.1 is distributing assembly 1.0.0) will take care of the problem.