简体   繁体   中英

Sysytem.EntryPointNotFoundException in Microsoft.Windows.Azurestorage.dll version 6.0.0

I am using Microsoft.WindowsAzure.Storage.dll version 6.0.0 for working with Azure table storage. While adding a new entry in the table, I am getting following error.

Line of code throwing error:

var operation = TableOperation.InsertOrReplace(entity);

await this.CloudTable.ExecuteAsync(operation).ConfigureAwait(false); -> // Throws error

where entity is of type TableEntity

I have referenced following assemblies:

<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net451" />
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net451" />
<package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net451" />
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net451" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="System.Spatial" version="5.6.4" targetFramework="net451" />
<package id="WindowsAzure.Storage" version="6.0.0" targetFramework="net451" />

Note: The code execute fine when run on my local machine, but throws above exception when run on a different environment which we don't own. (Different set of machines hosted somewhere else, and also we don't have access to these machines)

Error:

Error: System.EntryPointNotFoundException: Entry point was not found.#R##N# at Microsoft.WindowsAzure.Storage.Table.ITableEntity.get_PartitionKey()#R##N# at Microsoft.WindowsAzure.Storage.Table.TableOperation.GenerateCMDForOperation(CloudTableClient client, CloudTable table, TableRequestOptions modifiedOptions)#R##N#
at Microsoft.WindowsAzure.Storage.Table.TableOperation.BeginExecute(CloudTableClient client, CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, Object state)#R##N# at Microsoft.WindowsAzure.Storage.Table.CloudTable.BeginExecute(TableOperation operation, TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, Object state)#R##N# at Microsoft.WindowsAzure.Storage.Table.CloudTable.BeginExecute(TableOperation operation, AsyncCallback callback, Object state)#R##N# at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.TaskFromApm[T1,TResult](Func 4 beginMethod, Func 2 endMethod, T1 arg1, CancellationToken cancellationToken)#R##N# at Microsoft.WindowsAzure.Storage.Table.CloudTable.ExecuteAsync(TableOperation operation, CancellationToken cancellationToken)#R##N# at Microsoft.WindowsAzure.Storage.Table.CloudTable.ExecuteAsync(TableOperation operation)#R##N# at Microsoft.OnlinePublishing.Re try.TaskRetryer 2.DoAction()#R##N#--- End of stack trace from previous location where exception was thrown ---#R##N# at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)#R##N# at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)#R##N# at System.Runtime.CompilerServices.ConfiguredTaskAwaitable 1.ConfiguredTaskAwaiter.GetResult()#R##N# at Microsoft.OnlinePublishing.Ingestion.Common.Cache.CloudTableManager.d__6 1.MoveNext()

This exception indicates that there is a version mismatch of reference assembly "Microsoft.WindowsAzure.Storage.dll" between the assembly that defines your TableEntity type and the assembly that is operating on it.

Which version of "Microsoft.WindowsAzure.Storage.dll" is referenced by the assembly where your TableEntity type is defined?

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