winforms - 系统.DIINotFoundException : Failed to find library "leptonica-1.80.0.dll" for platform x86

标签 winforms selenium selenium-chromedriver tesseract leptonica

我在 WinForms 中运行自动化应用程序并使用 Tesseract,当我在本地主机上运行时它运行良好,但是当我将 bin 文件夹发布或导出到另一台计算机时,它向我显示此错误:

System.DIINotFoundException: Failed to find library "leptonica-1.80.0.dll" for platform x86.

in InteropDotNet.LibraryLoader.LoadLibrary(String fileName, String platformName)

in
Interop Runtimelmplementer.LeptonicaApiSignaturesInstance.Leptonica ApiSignaturesImplementation..ctor(LibraryLoader loader)
  1. 我已经尝试将其移动到 myproject\packages\Tesseract.4.1.1\lib\net45\leptonika-1.80.0.dll。 未成功
  2. 已检查 .NET 版本
  3. 我已经尝试在项目的 bin 文件夹中安装 tesseract 包

最佳答案

安装 vc_redist.x86。它对我有用。

关于winforms - 系统.DIINotFoundException : Failed to find library "leptonica-1.80.0.dll" for platform x86,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66860480/

相关文章:

c# - 如何获取标签的位置?

c# - 如果更改是由代码还是用户进行的,如何在 C# 事件中区分?

java - org.openqa.selenium.WebDriverException : chrome not reachable - when attempting to start a new session

python - Selenium Webdriver 未单击 Href 链接

c# - WinForms:DataGridView - 编程排序

wpf - WPF 和 Winforms 之间有性能差异吗?

c# - Selenium XPath 无法识别表格单元格中的文本

javascript - 获取错误 : Promise rejected with no or falsy reason in mocha selenium node js

java - 使用 Selenium 在没有 Select 标签的情况下自动化下拉框

python - 使用 Selenium 在 Python 中循环 XPath 元素位置