System.BadImageFormatException на ПК с программным обеспечением PC Sim
Я получаю это исключение: System.BadImageFormatException was unhandled
всякий раз, когда я пытаюсь запустить программу, скомпилированную на моем ПК. Я использую программное обеспечение Okuma PC Sim на своем ноутбуке.
Это происходит, даже если я открываю и компилирую приложение API Test, которое поставляется вместе с API.
Ниже приведены детали исключения:
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)
1 ответ
Решение
Пожалуйста, обратитесь http://support.microsoft.com/kb/967163
Long KB short... изменить настройки компиляции в VS. Настройка "ANYCPU" должна быть изменена в соответствии с целевой системой, x86 или x64.