简体   繁体   中英

How do I install WindowsAzure.Storage in Visual Studio 2013?

Note: this answer didn't help me because I don't have the same dll: System.Collections.Immutable 1.1.37

I'm using Visual Studio 2013 and .net 4.5 and following this tutorial: Get started with Azure Blob storage using .NET I am trying to install WindowsAzure.Storage but get this error:

Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.8.2)'. Attempting to resolve dependency 'System.Spatial (= 5.8.2)'. Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.8.2)'. Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.8)'. Attempting to resolve dependency 'Microsoft.Data.Services.Client (≥ 5.8.2)'. Attempting to resolve dependency 'System.Net.Requests (≥ 4.0.11)'. Attempting to resolve dependency 'System.ComponentModel.EventBasedAsync (≥ > 4.0.11)'. Attempting to resolve dependency 'System.Dynamic.Runtime (≥ 4.0.0)'. Attempting to resolve dependency 'System.Linq.Queryable (≥ 4.0.0)'. The 'System.Linq.Queryable 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.12.0.817'. 在此输入图像描述

when I upgrade Nuget per the red error in the image, it takes me to Extensions and Updates asking to update this: 在此输入图像描述

I don't know the relation between what I am looking for and this, but I went ahead and followed that update anyway, but get the error: 在此输入图像描述

Where should I proceed from here!?

based on comment form Simsons, I already checked that my processor supports Virtualization: 在此输入图像描述

When you try to install the WindowsAzure.Storage package through NuGet, this is the key error;

Attempting to resolve dependency 'System.Linq.Queryable (≥ 4.0.0)'. The 'System.Linq.Queryable 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.12.0.817'

Unfortunately, System.Linq.Queryable 4.0.0 requires NuGet 3.0 or above. So this isn't going to work on Visual Studio 2013.

Luckily, the newer System.Linq.Queryable 4.3.0 only requires NuGet 2.12 which is available for Visual Studio 2013.

So, to successfully install WindowsAzure.Storage in Visual Studio 2013 via NuGet:

  1. Download and Install NuGet 2.12 if you don't already have it. (OP has confirmed already having this version)
  2. In NuGet, Install System.Linq.Queryable 4.3.0
  3. In NuGet, Install WindowsAzure.Storage

Open your Visual Studio 2013. Go to Tools > NuGet Package Manager > Package Manager Console

In the packet manager console type:

Install-Package NuGet.Client -Version 3.2.0

I tried this using NuGet Client version 3.2.0. The current latest version is 4.3 (beta) or 4.2. So I'm not sure if it will work for versions 4.2 and 4.3, but it surely works for NuGet 3.2.0. NuGet >3 was all I needed for SendGrid and other packages.

Clearly for Visual Studio 2013 you can only use NuGet 2.12,

https://www.nuget.org

If you want to use NuGet 3.x as well as those packages that require NuGet 3.x, you have to upgrade to Visual Studio 2015 and above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM