Message=试图加载格式不正确的程序
D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\bin\Debug\Default.jw
里面没这个文件,

System.BadImageFormatException HResult=0x8007000B Message=试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B) Source=halcondotnet StackTrace: 在 HalconDotNet.HalconAPI.CreateProcedure(Int32 procIndex, IntPtr& proc) 在 HalconDotNet.HalconAPI.PreCall(Int32 procIndex) 在 HalconDotNet.HOperatorSet.SetCheck(HTuple check) 在 HalconDotNet.HWindowControl.createWindow(Boolean repair) 在 HalconDotNet.HWindowControl..ctor() 在 Halcon.Functions.HObjectViewer.InitializeComponent() 在 D:\jiagou\c#\IntegratedSoftware-master\Halcon\Functions\HObjectViewer.Designer.cs 中: 第 33 行 在 Halcon.Functions.HObjectViewer..ctor() 在 D:\jiagou\c#\IntegratedSoftware-master\Halcon\Functions\HObjectViewer.cs 中: 第 196 行 在 UIControl.HalconVision.HShowWindow.InitializeComponent() 在 D:\jiagou\c#\IntegratedSoftware-master\UIControl\UIControl.HalconVision\HShowWindow.Designer.cs 中: 第 36 行 在 UIControl.HalconVision.HShowWindow..ctor() 在 D:\jiagou\c#\IntegratedSoftware-master\UIControl\UIControl.HalconVision\HShowWindow.cs 中: 第 20 行 在 AutomationSystem.WindowForm.InitializeComponent() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\WindowForm.Designer.cs 中: 第 31 行 在 AutomationSystem.WindowForm..ctor() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\WindowForm.cs 中: 第 20 行 在 AutomationSystem.SystemMainForm.NewWindowForm() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\SystemMainForm.cs 中: 第 280 行 在 AutomationSystem.SystemMainForm.ResetFormLocation() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\SystemMainForm.cs 中: 第 124 行 在 AutomationSystem.SystemMainForm.SystemMainForm_Load(Object sender, EventArgs e) 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\SystemMainForm.cs 中: 第 94 行 在 System.Windows.Forms.Form.OnLoad(EventArgs e) 在 System.Windows.Forms.Form.OnCreateControl() 在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) 在 System.Windows.Forms.Control.CreateControl() 在 System.Windows.Forms.Control.WmShowWindow(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ScrollableControl.WndProc(Message& m) 在 System.Windows.Forms.Form.WmShowWindow(Message& m) 在 System.Windows.Forms.Form.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\bin\Debug\Default.jw 里面没这个文件,
System.BadImageFormatException HResult=0x8007000B Message=试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B) Source=halcondotnet StackTrace: 在 HalconDotNet.HalconAPI.CreateProcedure(Int32 procIndex, IntPtr& proc) 在 HalconDotNet.HalconAPI.PreCall(Int32 procIndex) 在 HalconDotNet.HOperatorSet.SetCheck(HTuple check) 在 HalconDotNet.HWindowControl.createWindow(Boolean repair) 在 HalconDotNet.HWindowControl..ctor() 在 Halcon.Functions.HObjectViewer.InitializeComponent() 在 D:\jiagou\c#\IntegratedSoftware-master\Halcon\Functions\HObjectViewer.Designer.cs 中: 第 33 行 在 Halcon.Functions.HObjectViewer..ctor() 在 D:\jiagou\c#\IntegratedSoftware-master\Halcon\Functions\HObjectViewer.cs 中: 第 196 行 在 UIControl.HalconVision.HShowWindow.InitializeComponent() 在 D:\jiagou\c#\IntegratedSoftware-master\UIControl\UIControl.HalconVision\HShowWindow.Designer.cs 中: 第 36 行 在 UIControl.HalconVision.HShowWindow..ctor() 在 D:\jiagou\c#\IntegratedSoftware-master\UIControl\UIControl.HalconVision\HShowWindow.cs 中: 第 20 行 在 AutomationSystem.WindowForm.InitializeComponent() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\WindowForm.Designer.cs 中: 第 31 行 在 AutomationSystem.WindowForm..ctor() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\WindowForm.cs 中: 第 20 行 在 AutomationSystem.SystemMainForm.NewWindowForm() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\SystemMainForm.cs 中: 第 280 行 在 AutomationSystem.SystemMainForm.ResetFormLocation() 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\SystemMainForm.cs 中: 第 124 行 在 AutomationSystem.SystemMainForm.SystemMainForm_Load(Object sender, EventArgs e) 在 D:\jiagou\c#\IntegratedSoftware-master\AutomationSystem\SystemMainForm.cs 中: 第 94 行 在 System.Windows.Forms.Form.OnLoad(EventArgs e) 在 System.Windows.Forms.Form.OnCreateControl() 在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) 在 System.Windows.Forms.Control.CreateControl() 在 System.Windows.Forms.Control.WmShowWindow(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ScrollableControl.WndProc(Message& m) 在 System.Windows.Forms.Form.WmShowWindow(Message& m) 在 System.Windows.Forms.Form.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
您好,请放置halcon.dll到生成路径根目录下,软件基于halcon12版本,Anycpu编译下应该需要halcon.dll 32位的版本
取消掉,就可以了
取消掉,就可以了 也可以。