System.BadImageFormatException: 引起这种异常的原因是应用程序本身不是有效的 Win32 应用程序,所以在你的项目属性下把Plateform target 设置成x86即可。