![](/img/trans.png)
[英]Could not load assembly 'Microsoft.Data.OData' when accessing Azure Storage during development
[英]Azure batch job error:Could not load file or assembly 'Microsoft.Data.OData
我可以運行該示例,而不會出現任何問題。 但是,當我使用azure將新應用程序創建為批處理作業時,在日志中發現了此錯誤。
似乎找不到參考。 我可以在本地運行控制台應用程序,而不會出現任何問題。
基於示例,對於這項工作,我們只需要將exe文件上傳到容器中,而無需壓縮整個項目。 誰能幫我解決這個問題。
這是我的錯誤信息:
Unhandled Exception: Microsoft.WindowsAzure.Storage.StorageException: Could not load file or assembly 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at Microsoft.WindowsAzure.Storage.Table.Protocol.TableOperationHttpWebRequestFactory.BuildRequestForTableOperation(Uri uri, UriQueryBuilder builder, IBufferManager bufferManager, Nullable`1 timeout, TableOperation operation, Boolean useVersionHeader, OperationContext ctx, TableRequestOptions options, String accountName)
at Microsoft.WindowsAzure.Storage.Table.TableOperation.<>c__DisplayClass18.<RetrieveImpl>b__15(Uri uri, UriQueryBuilder builder, Nullable`1 timeout, Boolean useVersionHeader, OperationContext ctx)
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ProcessStartOfRequest[T](ExecutionState`1 executionState, String startLogMessage)
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Table.TableOperation.Execute(CloudTableClient client, CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Table.CloudTable.Exists(Boolean primaryOnly, TableRequestOptions requestOptions, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Table.CloudTable.CreateIfNotExists(TableRequestOptions requestOptions, OperationContext operationContext)
at IpAddressDetect.Program.Main(String[] args)
要在計算節點上執行的任何任務也必須具有其所有依賴性。 在堆棧跟蹤中,您的任務似乎依賴於Azure存儲程序集,而該程序集又需要OData程序集(以及其他)。 所有這些都必須打包為應用程序包,單個.zip資源文件或單獨的多個資源文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.