Error TypeInitializationException

The Registration code should only be called once, if it is called a second time you may get a TypeInitializationException.

This is by design and is the result of re-initialization of static data.

This may happen because you are you using multiple generated libraries, please see knowledge base article: