我得到了一个例外:每当我试图运行一个在我的电脑上编译的程序时,System.BadImageFormatException was unhandled。我正在我的笔记本电脑上运行Okuma PC Sim软件。
即使我打开并编译API附带的API Test应用程序,也会发生这种情况。
以下是例外细节:
System.BadImageFormatException was unhandled
Message= is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Source=thincLathe
StackTrace:
at thincLathe.frmMain.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)发布于 2014-05-19 18:18:39
请参考http://support.microsoft.com/kb/967163
长KB短..。在VS中更改编译设置。"ANYCPU“设置应更改为与目标系统x86或x64相匹配。
https://stackoverflow.com/questions/23744346
复制相似问题