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
here is the Event Message
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
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 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.
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
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()
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.
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.