I am having a chicken and egg problem.
I have an application that crashes on application startup in a client machine with TypeInitializerException on some occasions but fails other times.
I was thinking about using procdump to collect the memory dump but it needs the instance to be running to be able to attach to the process and wait for an exception.
I can't get the procdump attached without starting the application and the application crashes on startup.
I can try starting the application from within WinDbg but I don't always hit the exception so not sure if it would be of help.
Any ideas or suggestions ?
The application was written targeting .NET Framework 4.5 and is running on Windows Server 2008 R2 (with latest updates). I haven't been able to reproduce this locally on my machine so far.
You can get procdump to start the app for you with the -x option. If you don't have that kind of control, you can get procdump listed as the debugger for the process. See this; the section called Launching a Process Under the Debugger. I haven't tried that.
Randy