发生System.BadImageFormatException无法加载exectuon的引用程序集如何解决? [英] System.BadImageFormatException occured cannot load a reference assembly for exectuon how to resolve it?

查看:456
本文介绍了发生System.BadImageFormatException无法加载exectuon的引用程序集如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

堆栈跟踪

at InstaPlayer.Insta_Player.Insta_Player_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at InstaPlayer.Program.Main() in D:\PRoject\InstaPlayer\InstaPlayer\Program.cs:line 18

推荐答案

从那开始?不知道.

尝试查看program.cs,第18行-它至少会告诉您您正在尝试执行的操作,这会导致问题.

根据您提供的信息,我们只能做更多的事情.
From that? No idea.

Try looking at program.cs, line 18 - it will at least tell you what you are trying to do that is causing the problem.

From what you have given us, we can do no more than that.


一个常见的原因是试图在64位进程中加载​​32位程序集.也许您在项目设置中定义了AnyCPU,并且其中一个程序集被显式编译为x86或x64,所以当应用程序在某些计算机上运行时,它会因为期望一个而又得到另一个而失败.
One common cause is trying to load a 32-bit assembly in 64-bit process. Perhaps you have AnyCPU defined in your project settings and one of your assemblies is explicitly compiled as x86 or x64 so when the application runs on a some machines it fails because it''s expecting one but getting the other.


这篇关于发生System.BadImageFormatException无法加载exectuon的引用程序集如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆