首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

求元方来解决这个有关问题

2012-12-26 
求元方来解决这个问题用VS2010写的一个C#窗体程序打包后安装,启动后有一个界面无法启动,报错什么异常文本,

求元方来解决这个问题
用VS2010写的一个C#窗体程序打包后安装,启动后有一个界面无法启动,报错什么异常文本,怎么回事啊,应该怎么解决

报错信息:
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.ComponentModel.Win32Exception: 参数不正确。
   在 System.Drawing.Icon.Initialize(Int32 width, Int32 height)
   在 System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
   在 System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   在 System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   在 System.Runtime.Serialization.ObjectManager.DoFixups()
   在 System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   在 System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
   在 System.Resources.ResourceReader._LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
   在 System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
   在 System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode)
   在 System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)
   在 System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase)
   在 System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
   在 System.Resources.ResourceManager.GetObject(String name)
   在 Lantop.Form1.InitializeComponent()
   在 Lantop.Form1..ctor()
   在 Lantop.Form2.button1_Click(Object sender, EventArgs e)
   在 System.Windows.Forms.Control.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
   在 System.Windows.Forms.Button.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




************** 已加载的程序集 **************
mscorlib
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.296 (RTMGDR.030319-2900)
    基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Lantop
    程序集版本: 1.0.0.0
    Win32 版本: 1.0.0.0
    基本代码: file:///C:/Program%20Files/默认公司名称/LantopSetup/新建文件夹%20%231/Lantop.exe
----------------------------------------
System.Windows.Forms
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.278 built by: RTMGDR
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.282 built by: RTMGDR
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.296 built by: RTMGDR
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 (RTMRel.030319-0100)
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 built by: RTMRel
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MySQLDriverCS
    程序集版本: 3.0.1735.36021
    Win32 版本: 3.0.1735.36021
    基本代码: file:///C:/Program%20Files/默认公司名称/LantopSetup/新建文件夹%20%231/MySQLDriverCS.DLL
----------------------------------------
System.Data
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 (RTMRel.030319-0100)
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 built by: RTMRel
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Numerics
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 built by: RTMRel
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
mscorlib.resources
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 (RTMRel.030319-0100)
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll


----------------------------------------
System.Windows.Forms.resources
    程序集版本: 4.0.0.0
    Win32 版本: 4.0.30319.1 built by: RTMRel
    基本代码: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如: 

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。

[最优解释]
  在 System.Drawing.Icon.Initialize(Int32 width, Int32 height)
   在 System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)



好像是icon~~~~
[其他解释]
删除了窗体再创建个,图标资源的问题。
[其他解释]
堆栈中资源问题,你打包的时候有没有把管理的内容文件以内容打包进去。如果没有则会出现此问题。
[其他解释]
元芳元芳,狄国老需要你啊!
[其他解释]
异常提示:参数不正确。
你看看代码里需要传参的地方
[其他解释]
没什么传参的程序啊,关键是好几个子form都能调出来,就这个调不出来,这些form写的都是差不多的,这个没有什么特别的东西啊
[其他解释]
加运行日志,调试吧,自己的东西,别人帮不了你
[其他解释]
大人,此程序必有蹊跷。
[其他解释]
远方不在,你看要不要找诸葛亮
[其他解释]
圆方看了也蒙啊
[其他解释]
该回复于2012-12-05 15:31:16被管理员删除

热点排行