For my bot, I wanted to save data in to Azure storage table. I'm following the instructions from this MSDN link to add Azure storage API to my console application (.net=4.5.2v). When installing below package got an error
Install-Package Microsoft.Azure.CosmosDB.Table -Version 1.1.3
Error
Install-Package : Unable to resolve dependencies. 'Microsoft.Azure.DocumentDB 1.22.0' is not compatible with 'Microsoft.Azure.CosmosDB.Table 1.1.3 constraint:
Microsoft.Azure.DocumentDB (>= 1.22.0)
I tried installing the dependent library Microsoft.Azure.DocumentDB
using
Install-Package Microsoft.Azure.DocumentDB -Version 1.22.0
Then I tried installing Microsoft.Azure.CosmosDB.Table
which gives the same error
How do I resolve this issue?
Install-Package : Unable to resolve dependencies. 'Microsoft.Azure.DocumentDB 1.22.0' is not compatible with 'Microsoft.Azure.CosmosDB.Table 1.1.3 constraint: Microsoft.Azure.DocumentDB (>= 1.22.0)
I can reproduce same issue. I check the dependencies of Microsoft.Azure.CosmosDB.Table 1.1.3 and find that it requires Microsoft.Azure.Storage.Common (>= 8.6.0-preview && <= 9.0.0.1-preview).
To solve the issue, you can downgrade Microsoft.Azure.Storage.Common to 9.0.0.1-preview. The following packages.config
works for me, you can try to use it in your console application.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Azure.CosmosDB.Table" version="1.1.3" targetFramework="net452" />
<package id="Microsoft.Azure.DocumentDB" version="1.22.0" targetFramework="net452" />
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net452" />
<package id="Microsoft.Azure.Storage.Common" version="9.0.0.1-preview" targetFramework="net452" />
<package id="Microsoft.Data.Edm" version="5.8.2" targetFramework="net452" />
<package id="Microsoft.Data.OData" version="5.8.2" targetFramework="net452" />
<package id="Microsoft.Data.Services.Client" version="5.8.2" targetFramework="net452" />
<package id="Microsoft.OData.Core" version="7.2.0" targetFramework="net452" />
<package id="Microsoft.OData.Edm" version="7.2.0" targetFramework="net452" />
<package id="Microsoft.Spatial" version="7.2.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net452" />
<package id="System.ComponentModel.EventBasedAsync" version="4.0.11" targetFramework="net452" />
<package id="System.Dynamic.Runtime" version="4.0.0" targetFramework="net452" />
<package id="System.Linq.Queryable" version="4.0.0" targetFramework="net452" />
<package id="System.Net.Requests" version="4.0.11" targetFramework="net452" />
<package id="System.Spatial" version="5.8.2" targetFramework="net452" />
</packages>