创建独立exe的问题。文件c#

时间:2020-03-31 16:12:20

标签: c# .net windows file exe

我正在尝试从我的程序(Tesseract OCR)创建单个独立的exe文件。 我正在使用Visual Studio 2017这个以C#编写的项目。 我尝试了ILMergeGUI,但无法正常工作。 我尝试发布我的应用程序(右键单击项目名称--->“ publish”),但是当我单击发布项目的exe文件时,出现此错误: the photo of the error

,详细信息是:

有关调用即时(JIT)调试而不是此对话框的详细信息,请参阅此消息的结尾。

**************异常文本************** Tesseract.TesseractException:无法初始化tesseract引擎。 有关详细信息,请参见https://github.com/charlesw/tesseract/wiki/Error-1
在Tesseract.TesseractEngine.Initialise(String数据路径,字符串 语言,EngineMode engineMode,IEnumerable 1 configFiles, IDictionary 2个initialValues,布尔值setOnlyNonDebugVariables)位于 Tesseract.TesseractEngine..ctor(String datapath,String language, Tesseract_OCR.Form1.btOCR_Click(Object上的EngineMode engineMode) 发送者,EventArgs e)位于 System.Windows.Forms.Control.OnClick(EventArgs e)在 System.Windows.Forms.Button.OnClick(EventArgs e)位于 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)在 System.Windows.Forms.Control.WmMouseUp(Message&m,MouseButtons 按钮,则Int32点击) System.Windows.Forms.Control.WndProc(Message&m)位于 System.Windows.Forms.ButtonBase.WndProc(Message&m)位于 System.Windows.Forms.Button.WndProc(Message&m)位于 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg, IntPtr wparam,IntPtr lparam)

**************加载的装配体************** mscorlib 程序集版本:4.0.0.0 Win32版本:4.8.4121.0创建人:NET48REL1LAST_C 代码库:file:/// C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll ---------------------------------------- Tesseract-OCR 程序集版本:1.0.0.0 Win32版本:1.0.0.0 代码库:file:/// C:/Users/%D7%A0%D7%99%D7%A8/AppData/Local/Apps/2.0/P2WZ32ZN.XRC/YRBPP1Z4.19B/tess..tion_2d4c106497765347_0001.0000_c5dcc2229b39aef5/Tesseract- OCR文件 ---------------------------------------- System.Windows.Forms 程序集版本:4.0.0.0 Win32版本:4.8.4121.0创建人:NET48REL1LAST_C 代码库:file:/// C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ----------------------------------------系统 程序集版本:4.0.0.0 Win32版本:4.8.4001.0创建人:NET48REL1LAST_C 代码库:file:/// C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing 程序集版本:4.0.0.0 Win32版本:4.8.3752.0创建人:NET48REL1 代码库:file:/// C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll - - - - - - - - - - - - - - - - - - - - 系统配置 程序集版本:4.0.0.0 Win32版本:4.8.3752.0创建人:NET48REL1 代码库:file:/// C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Core 程序集版本:4.0.0.0 Win32版本:4.8.4121.0创建人:NET48REL1LAST_C 代码库:file:/// C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Xml 程序集版本:4.0.0.0 Win32版本:4.8.3752.0创建人:NET48REL1 代码库:file:/// C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Tesseract 程序集版本:3.0.2.0 Win32版本:3.0.2.0 代码库:file:/// C:/Users/%D7%A0%D7%99%D7%A8/AppData/Local/Apps/2.0/P2WZ32ZN.XRC/YRBPP1Z4.19B/tess..tion_2d4c106497765347_0001.0000_c5dcc2229b39aef5/Tesseract。动态链接库 ---------------------------------------- InteropRuntimeImplementer.LeptonicaApiSignaturesInstance 程序集版本:0.0.0.0 Win32版本:3.0.2.0 代码库:file:/// C:/Users/%D7%A0%D7%99%D7%A8/AppData/Local/Apps/2.0/P2WZ32ZN.XRC/YRBPP1Z4.19B/tess..tion_2d4c106497765347_0001.0000_c5dcc2229b39aef5/Tesseract。 dll文件 ---------------------------------------- InteropRuntimeImplementer.TessApiSignaturesInstance 程序集版本:0.0.0.0 Win32版本:3.0.2.0

代码库:file:/// C:/Users/%D7%A0%D7%99%D7%A8/AppData/Local/Apps/2.0/P2WZ32ZN.XRC/YRBPP1Z4.19B/tess..tion_2d4c106497765347_0001.0000_c5dcc2229b39aef5 /Tesseract.dll

**************** JIT调试**************要启用即时(JIT)调试,请使用.config文件此应用程序或计算机 (machine.config)必须在其中设置jitDebugging值 system.windows.forms部分。该应用程序还必须编译 启用调试。

例如:

启用JIT调试后,任何未处理的异常都会发送到 在计算机上注册而不是由计算机处理的JIT调试器 此对话框。

有人可以帮助我吗?问题是什么?我尝试搜索他们在错误中写的链接: https://github.com/charlesw/tesseract/wiki/Error-1 但这对我没有帮助。

或者有人可能会创建另一个exe文件。文件?

0 个答案:

没有答案