سؤال

I am attempting to update my program but installing Windows Azure Storage 3.0.3.0 via NuGet but when I do this I get the following:

Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.6.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.6.1)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.6.1)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 5.0.6)'.
Attempting to resolve dependency 'Microsoft.Data.Services.Client (≥ 5.6.0)'.
Attempting to resolve dependency 'Microsoft.Data.OData (= 5.6.0)'.
Already referencing a newer version of 'Microsoft.Data.OData'.

To be honest I think this an issue with the released package as I know it is new.

As anyone seen this before? If so how have you resolved this problem?

I know I could just rollback OData to the version that is supported but wondered if there were other options?

هل كانت مفيدة؟

المحلول 2

I fixed the exact same problem by downgrading these to 5.6.0:

  • Microsoft.Data.OData
  • Microsoft.Data.Edm
  • System.Spatial

After updating Windows Azure Storage to 3.0.3.0 I was able to re-update them to 5.6.1.

I found this command useful to downgrade:

uninstall-package <package> -force

-force will continue regardless of dependencies, but in this case we are adding them back so that should be fine.

نصائح أخرى

From the your comments it looks like they already had a version of Odata greater than 5.6.1 installed in your project. Therefore:

  • Since the dependency graph generated on install would dictate the Odata be 5.6.0
  • And the you already has a higher version of Odata installed in your project
  • The installation of the package should fail, as we will not downgrade any package during an install-package or update-package

For how to fix this, first make sure you have at least the 2.8 version of NuGet installed. Then you should use the Package Manager Console and enter:

Update-package Microsoft.data.odata –version 5.6.0

Then either:

Install-package windowsazure.storage –version 3.0.3

Or:

Update-package windowsazure.storage –version 3.0.3

Depending on whether it’s an upgrade or an install of the Windows Azure storage libraries.

Microsoft.Data.Services.Client is looking for Microsoft.Data.OData version equal to 5.6.0. However as per the dependency of Windows Azure Storage 3.0.3.0 it looks for Microsoft.Data.OData version >= 5.6.0, so latest version of Microsoft.Data.OData gets installed which is higher than 5.6.0. So while installing Microsoft.Data.Services.Client it finds that there is already higher incompatible version of Microsoft.Data.OData installed and fails to update the nuget package.

Easiest solution to this problem is as below:

If you are updating the Windows Azure Storage nuget package please follow below steps:

  1. Update the Microsoft.Data.OData version to 5.6.0 using nuget package manager command Update-Package Microsoft.Data.OData -Version 5.6.0
  2. Update the nuget package Windows Azure Storage to 3.0.3.0

If you are installing the Windows Azure Storage nuget package, follow below steps:

  1. Install the Microsoft.Data.OData version to 5.6.0 using nuget package manager command Install-Package Microsoft.Data.OData -Version 5.6.0
  2. Install the nuget package Windows Azure Storage 3.0.3.0

Just type in the below command in Package Manager Console.

PM> Install-package windowsazure.storage –version 3.0.3
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top