C#Windows应用程序事件:应用程序启动时CLR20r3 [英] C# windows application Event: CLR20r3 on application start
问题描述
我创建了一个C#应用程序并将其安装在测试箱上。我的应用程序可以在我的开发箱上完美运行,但是当我在其他计算机上安装时,它在Main()中崩溃。我得到了EventType:CLR20r3
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
我使用了详细信息并查找了错误代码在IL Disassembler中,然后返回以下内容...
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.
这是Main()中唯一的代码
This is the only code in my Main()
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
以下是事件查看器中的详细信息
Here are the details from the Event Viewer
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.
推荐答案
我的应用程序依赖于部署计算机上不存在的引用程序集。我不确定从安装目录中引用DotNetBar是什么意思-确保将其设置为 CopyLocal = true 在您的项目中,或者在开发和生产机器上都位于同一完整路径中。
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.
这篇关于C#Windows应用程序事件:应用程序启动时CLR20r3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!