从批处理服务执行exe文件时出现错误 [英] Getting error when executing exe file from Batch service

查看:99
本文介绍了从批处理服务执行exe文件时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个正在创建HDInsight R群集的on.Net应用程序.当我手动执行代码时,代码工作正常.

但是,当我尝试使用批处理服务从ADF运行Exe时,却遇到了以下错误.


未处理的异常:System.IO.FileLoadException:无法加载文件或程序集"Newtonsoft.Json,版本= 9.0.0.0,区域性=中性,PublicKeyToken = 30ad4fe6b2a6aeed"或其依赖项之一.找到的程序集的清单定义与 程序集参考. (来自HRESULT的异常:0x80131040)
    at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ProviderRegistrationDelegatingHandler..ctor(AzureCredentials凭据)
  Microsoft.Azure.Management.ResourceManager.Fluent.Core.AzureConfigurable`1.BuildRestClient(AzureCredentials凭据)
  Microsoft.Azure.Management.Fluent.Azure.Configurable.Microsoft.Azure.Management.Fluent.Azure.IConfigurable.Authenticate(AzureCredentials凭据)
    at Hdinsight.hidinsight.executeSSHCommand(Int32 Cluster_Create_Delete_Flag)
    at Hdinsight.Program.Main(String [] args)

< g class =" gr_ gr_258 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id ="258". id ="258">谢谢,</g>

Vipin Jha


感谢& amp;问候,Vipin jha MCP

解决方案

该exe文件在哪里运行?听起来像是Newtonsoft.Json版本的问题.此stackoverflow线程应该有帮助.  欢呼,

Alberto Vega


Hi,

I have created an on.Net application which is creating HDInsight R cluster. A code is working fine when I am executing it manually.

But when I try to run Exe from ADF using Batch service I am getting below error.


Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ProviderRegistrationDelegatingHandler..ctor(AzureCredentials credentials)
   at Microsoft.Azure.Management.ResourceManager.Fluent.Core.AzureConfigurable`1.BuildRestClient(AzureCredentials credentials)
   at Microsoft.Azure.Management.Fluent.Azure.Configurable.Microsoft.Azure.Management.Fluent.Azure.IConfigurable.Authenticate(AzureCredentials credentials)
   at Hdinsight.hidinsight.executeSSHCommand(Int32 Cluster_Create_Delete_Flag)
   at Hdinsight.Program.Main(String[] args)

<g class="gr_ gr_258 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="258" id="258">Thanks ,</g>

Vipin Jha


Thankx &amp; regards, Vipin jha MCP

解决方案

Hi,

Where is the exe being ran? It sounds like an issue with the version of Newtonsoft.Json. This stackoverflow thread should help. https://stackoverflow.com/questions/22685530/could-not-load-file-or-assembly-newtonsoft-json-or-one-of-its-dependencies-ma

Cheers,

Alberto Vega


这篇关于从批处理服务执行exe文件时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆