Article: Error "Type Initialization Exception" when installing MailStore Home

Symptom / Exception:

System.TypeInitializationException: The type initializer for 'MailStore.Core.MSEnv' threw an exception.
or
System.TypeInitializationException: The type initializer for 'MailStore.MailStore.Controls.BlackHeading' threw an exception.

Analysis / Background:

New Windows .Net applications (like MailStore Home) are programmed strictly object oriented. They make use of the CLR (Common Language Runtime) and the CTS (Common Type System) of Microsoft Windows. In the above situation MailStore was not able to use a TYPE that is initialized (defined) via the CTS. When getting a ‘System.TypeInitializationException’ error message from .Net it basically means that your .Net framework is not providing it (not current .Net framework).

Solution/Workaround:

  1. Please install the .Net Framework 4.6.1: https://www.microsoft.com/en-US/download/details.aspx?id=49982
  2. Reboot and install MailStore Home.

Error Message:

En-Type


Further Information or Reading

  • Product Version: any MailStore product that requires .Net Framework 4.6.1
  • In case installing the .Net framework 4.6.1 does not resolve the symptom, it is most likely a defect of the framework itself. In order to validate/verify the framework you can use “Aaaron Stebner’s .NET Framework Setup Verification Tool”, which you can download via Microsofts URL here: http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx
1 Like