I made a program which works perfectly fine when I launch it manually but I added it to the run key on registry to auto start it on windows start up. Whenever I restart the OS to check if the start up works, I end up getting this error and the application crashes:
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: myApp.exe
Problem Signature 02: 6.3.9600.16384
Problem Signature 03: 5837dc5a
Problem Signature 04: System
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4ca2ba90
Problem Signature 07: 3aa1
Problem Signature 08: 288
Problem Signature 09: System.ComponentModel.Win32
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
But even after the crash, if I go to the folder and launch the app manually it works perfectly fine. What could be the problem? Is it that System.ComponentModel takes time to load up or something? If thats the case then what might be a solution to fix it? TIA.
EDIT: Traced the cause of the problem:
System.ComponentModel.IContainer components = null;
I think System.ComponentModel takes some time to load.