I have a static class without a static constructor, but many static members. I throw a TypeInitializationException when the class is first used.
I am breaking CLR exceptions and I have disabled "Just My Code".
The problem is that I get this exception only the first time I use this class; I do not violate the static field initializer. I could, of course, remove the static elements until I find the culprit, but is there an easier way?
Does anyone have any tips on debugging a static field initialization?
source
share