在Web API中使用SpeechClient.dll引发异常 [英] Using SpeechClient.dll in Web API raise exception

查看:89
本文介绍了在Web API中使用SpeechClient.dll引发异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



你好, 


我正在使用Speech API并希望公开使用STT转换的特定休息服务,web api
i在第一次执行时遇到此异常:


System.BadImageFormatException:
无法加载文件或程序集"SpeechClient"或其依赖项之一。尝试加载程序格式不正确。




此警告:


还有
是正在构建的项目的处理器架构与"MSIL"之间的不匹配。以及参考"SpeechClient,Version = 0.0.0.0,Culture = neutral,processorArchitecture = AMD64","x86"的处理器体系结构。这种不匹配
可能会导致运行时故障。请考虑通过Configuration Manager更改项目的目标处理器体系结构,以便在项目和引用之间调整处理器体系结构,或者依赖与
a处理器体系结构相匹配的引用,这些体系结构与项目的目标处理器体系结构相匹配。





有谁知道为什么我得到这个例外?


欢迎你的帮助


谢谢










解决方案

我收到同样的警告,也希望得到帮助。这会导致问题吗?有没有办法让警告消失?


正在构建的项目的处理器架构与"MSIL"之间存在不匹配。以及参考"SpeechClient,Version = 0.0.0.0,Culture = neutral,processorArchitecture = AMD64","AMD64"的处理器体系结构。
不匹配可能导致运行时故障。请考虑通过Configuration Manager更改项目的目标处理器体系结构,以便在项目和引用之间调整处理器体系结构,或者使用与项目的目标处理器体系结构相匹配的处理器体系结构依赖引用

Hello, 

I'm working with Speech API and want to expose a particular restful service using STT conversion, with a web api i got this exception at the first execution :

System.BadImageFormatException: Could not load file or assembly 'SpeechClient' or one of its dependencies. Attempt to load a program incorrect format.

with this warning :

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpeechClient, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.


Does anyone know why i'm getting this exception ?

Your help is welcome guys

Thanks




解决方案

I'm getting the same warning and would also like help. Does this cause issues? Is there a way to make the warning go away?

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpeechClient, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.


这篇关于在Web API中使用SpeechClient.dll引发异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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