C#窗器件的应用事件:CLR20r3在应用程序启动应用程序、器件、事件

2023-09-02 10:30:44 作者:戒情戒爱了

好了,所以我创建一个C#应用程序,并在我的测试中安装它。我的应用程序完美的作品对我的开发中,但是当我在不同的机器上安装的崩溃在main()。我得到的事件类型:CLR20r3

OK, so I created a c# application and installed it on my test box. My app works perfect on my dev box, but when I install in on a different machine it crashes in the Main(). I get the EventType: CLR20r3

这里是事件消息

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01:   logfileviewer.exe
    Problem Signature 02:   1.0.0.0
    Problem Signature 03:   4f356c9c
    Problem Signature 04:   LogFileViewer
    Problem Signature 05:   1.0.0.0
    Problem Signature 06:   4f356c9c
    Problem Signature 07:   94
    Problem Signature 08:   44
    Problem Signature 09:   System.IO.FileNotFoundException
    OS Version: 6.1.7601.2.1.0.256.1
    Locale ID:  1033
    Additional Information 1:   0a9e
    Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
    Additional Information 3:   0a9e
    Additional Information 4:   0a9e372d3b4ad19135b953a78882e789

我使用的细节,抬头错误code在IL反汇编器和凸轮,同时显示以下...

I used the details and looked up the error code in IL Disassembler and cam back with the following...

    Method #5 (06000094) 
    -------------------------------------------------------
    MethodName: .ctor (06000094)
    Flags : [Public] [HideBySig] [ReuseSlot] [SpecialName] [RTSpecialName] [.ctor] (00001886)
    RVA : 0x000081d0
    ImplFlags : [IL] [Managed] (00000000)
    CallCnvntn: [DEFAULT]
    hasThis 
    ReturnType: Void
    No arguments.

.NET 4.0已被卸载并重新安装到系统中,并没有改变任何东西。我已经找遍了所有过网,每个人都具有同样的问题似乎并没有有一个解决方案。现在我已经用了一天半的时间在这个问题上。我不想错过我的最后期限做不能够启动应用程序。

.NET 4.0 has been uninstalled and re installed on the system and did not change anything. I have searched all over the net and everyone with the same problem do not seem to have a solution. I have now spent a day and a half on this problem. I would hate to miss my deadline do to not being able to launch the application.

这是唯一的code在我的Main()

This is the only code in my Main()

    static void Main()
    {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new frmMain());
    }

下面是从事件查看器

    Application: LogFileViewer.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException
    Stack:
        at LogFileViewer.frmMain.InitializeComponent()
        at LogFileViewer.frmMain..ctor()
        at LogFileViewer.Program.Main()

EVENTDATA

EventData

    Application: LogFileViewer.exe 
    Framework Version: v4.0.30319 
    Description: The process was terminated due to an unhandled exception. 
    Exception Info: System.IO.FileNotFoundException 
    Stack: at LogFileViewer.frmMain.InitializeComponent() at LogFileViewer.frmMain..ctor() at LogFileViewer.Program.Main() 

不知道如何设计人员可以有一个FileNotFound异常。我现在用的是DotNetBar.dll,我引用它的安装目录中,这样应该是不错的。我可以张贴我的设计师,如果你想要的,但有相当多的出现。 任何人有什么想法?

Not sure how the designer can have a FileNotFound Exception. I am using the DotNetBar.dll and I am referencing it out of the install directory, so that should be good. I can post my designer if you want, but there is quite a bit there. anyone have any ideas?

推荐答案

我已经看到了这个相同的问题时,我的应用程序依赖于一个引用的程序集,这不是在部署机器上的present。我不知道你所说的参考DotNetBar出了安装目录的的意思是 - 确保它被设置为 CopyLocal =真在你的项目中,或存在于两者的开发和生产计算机上的相同的完整路径。

I've seen this same problem when my application depended on a referenced assembly that was not present on the deployment machine. I'm not sure what you mean by "referencing DotNetBar out of the install directory" - make sure it's set to CopyLocal=true in your project, or exists at the same full path on both your development and production machine.