Pages

Tuesday, April 17, 2012

How to fix "TypeInitializationException"?

This exception is thrown as a wrapper around the exception thrown by the class initializer.
Best thing is to check the inner exception details. (View details)

I got the following exception:
The type initializer for 'Antlr.StringTemplate.StringTemplate' threw an exception

Due to one assembly missing:

{"Could not load file or assembly 'antlr.runtime, Version=2.7.7.3, Culture=neutral, PublicKeyToken=d7701e059243744f' or one of its dependencies. The system cannot find the file specified.":"antlr.runtime, Version=2.7.7.3, Culture=neutral, PublicKeyToken=d7701e059243744f"}
I could fix this after I add antlr.runtime dll as a reference to the project.

No comments:

Post a Comment