且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Web API中使用SpeechClient.dll引发异常

更新时间:2022-10-15 23:34:44

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


正在构建的项目的处理器架构与"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.