I have an installation of SQL Server 2014 on a server on the LAN and on my PC I have SQL Server Management Studio 2014 for few months already. Out of no where when I open SSMS I get

The type initializer for 'system.windows.media.fonts' threw an exception

I have no clue of what might have caused this exception. I tried re-installing SSMS 2014, removing all SQL components on my PC and re-installing SSMS again, I even removed .NET 4.7 (Because I have VS 2017 as well). What is the cause for this exception and how to resolve it?


This issue has been posted as a Microsoft Connect item.

2012 SSMS System.Windows.Media.Fonts Exception On New Query

A possible workaround was posted by the author as follows:

I have found that if change the font for the "Text Editor" from the default of "Consolas" to something else (e.g. Lucida Console), this problem goes away.

  • 2
    Changing the font from Consolas to something else. Saving it, and then changing it back fixed the problem without messing with the font. – EricI Mar 2 '18 at 23:25

You could upgrade to the latest and greatest SSMS at https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms

It does not crash as often as the old versions, and it has a nice interface to the XEvent Profiler.

  • Can SSMS 17 connect to SQL server 2014? Unfortunately I am close to a production release, but I might consider upgrading before the release. Thanks! – 3bdalla Jan 23 '18 at 9:08
  • 1
    @3bdalla; yes it can. – Henrik Staun Poulsen Jan 23 '18 at 14:02

This is a known issue that microsoft pushed out in the .NET Framework January 2018 Monthly Rollup. It was initially published under KB4055002, but has since been fixed with KB4074880: https://support.microsoft.com/en-us/help/4074880/description-of-the-security-and-quality-rollup-for-net-framework-4-6-4

Microsoft gives some workarounds to fix the issue: https://support.microsoft.com/en-us/help/4074906/typeinitializationexception-or-fileformatexception-error-in-wpf-apps-t

  • For some reason I removed .NET 4.7.1 and re-installed and everything works. But will try this if it comes back. Thanks! – 3bdalla Jan 23 '18 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.