10
Vote

Cannot update Nuget Package 'Microsoft.Data.OData.Contrib'

description

I can't update to the latest stable or prerelease versions of anything with a dependency on Microsoft.Data.OData.Contrib like OdataLib. This is because Microsoft.Data.OData.Contrib has a hard coded nuget dependency requirement on Microsoft.Data.OData that says the max version is 5.0.1. Updating fails because "unable to find a version of 'Microsoft.AspNet.WebApi.OData' that is compatible with 'Microsoft.Data.OData.Contrib 5.0.1'

comments

Woland wrote Sep 24, 2012 at 11:14 PM

encountered the same issue, since there is an updated library ODataLib that is 5.0.2, which new WCF Data Client depends on.

blake05 wrote Oct 8, 2012 at 9:45 PM

Only two people have ran into this issue?

coynej60 wrote Oct 9, 2012 at 9:08 AM

The only way I was able to resolve the issue was to uninstall all of the Web Api and OData packages and then reinstall. Note: when reinstalling the OData package it errored out unless I used the -IgnoreDepencies option on the PM console. I hope that helps.

kobush wrote Nov 13, 2012 at 7:19 PM

I have encountered this issue with latest version from http://nuget.org/packages/Microsoft.AspNet.WebApi.OData/0.2.0-alpha

I first installed latest Microsoft.Data.OData.Contrib (5.1.0) then the WebApi OData. It errored with this:

Install failed. Rolling back...
Install-Package : Already referencing a newer version of 'Microsoft.Data.OData.Contrib'.
At line:1 char:16
  • Install-Package <<<< Microsoft.AspNet.WebApi.OData -Pre
    • CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

alexdresko wrote Nov 25, 2012 at 4:41 PM

I've experienced this twice. The first time I thought it was because I did an "update-package -includeprerelease", but I'm also experiencing it on a project where I've only done a simple "update-package".

suh3ndra wrote Feb 9, 2013 at 12:45 AM

I also run into this issue. Installing other package that require this package always try to install 5.0.2 version although newer exist.

lukepuplett wrote Jan 6, 2015 at 9:18 AM

I just uninstalled it.

I looked through the other packages and couldn't see anything that depended on it [anymore?] Then updated all the other OData libs, and everything else, without a hitch.