Azure batch job error:Could not load file or assembly 'Microsoft.Data.OData

Azure batch job error:Could not load file or assembly 'Microsoft.Data.OData

我阅读了 https://azure.microsoft.com/en-us/documentation/articles/batch-dotnet-get-started/#step-2-upload-task-application-and-data-files 并下载了示例文件。

我可以 运行 样本没有任何问题。但是,当我使用 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 资源文件或单独的多个资源文件。