0

我阅读了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)
4

1 回答 1

1

要在计算节点上执行的任何任务也必须具有其所有依赖项。在堆栈跟踪中,您的任务似乎取决于 Azure 存储程序集,而后者又需要 OData 程序集(以及其他程序集)。所有这些都必须打包为一个应用程序包、单个 .zip 资源文件或单独的多个资源文件。

于 2016-08-11T15:28:35.367 回答