"TypeInitializationException" or "FileFormatException" error in a WPF application

Thread is closed for posting
1 posts, 0 answers
  1. Martin
    Martin avatar
    1 posts
    Member since:
    Dec 2013

    Posted 15 Jan Link to this post

    Symptoms:

    Most controls from the UI for WPF are affected after you install January 9, 2018, .NET Security and Quality Rollup (KB4055002). Applications that request a fallback font or a character that is not included in the currently selected font return the following error messages:
    System.TypeInitializationException
    “FileFormatException: No FontFamily element found in FontFamilyCollection that matches current OS or greater: Win7SP1”.
    Inner exception originates from: CompositeFontParser




    Solution 1:


    Microsoft has released an update which fixes the issue. More information about it you can find here: Description of the Security and Quality Rollup for .NET Framework 4.6, 4.6.1, 4.6.2, 4.7, and 4.7.1 for Windows 7 SP1 and Server 2008 R2 SP1 (KB 4074880).

    Solution 2:

    To keep .NET 4.7.1 installed and maintain protection against vulnerabilities that are addressed by the January security updates, uninstall the January .NET Framework Security and Quality Rollup (KB 4055002), and then install the January .NET Framework Security-Only Update (KB 4054183). To do this, follow these steps:

    1. In Control Panel, open the Windows Update item, and then select View update history.
    2. In the Review your update history list, locate and select Security Update for Microsoft .NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (KB4055002). Then, select Uninstall.
    3. When you are prompted for confirmation to uninstall, select Yes.
    4. Restart your computer if you are prompted to do this.
    5. Download and install the Security Only update for .NET Framework 4.6, 4.6.1, 4.6.2, 4.7, and 4.7.1 for Windows 7 SP1 and Windows Server 2008 R2 SP1 and .NET Framework 4.6 for Windows Server 2008 SP2 (KB 4054183) for your operating system configuration from the following links:
      Security Only update for .NET Framework 4.6, 4.6.1, 4.6.2, 4.7, and 4.7.1 for Windows 7 SP1 and Windows Server 2008 R2 SP1 for x86 systems (KB4054183)
      Security Only update for .NET Framework 4.6, 4.6.1, 4.6.2, 4.7, and 4.7.1 on Windows 7 SP1 and Windows Server 2008 R2 SP1 for x64 systems (KB4055269)
    6. Follow the installation prompts, and then restart your computer if you are prompted to do this.

    Solution 3:

    Roll back to the previous version of .NET Framework. To do this, follow these steps:

    1. In Control Panel, open the Programs and Features item.
    2. In the Uninstall or change a program list, locate and then select Microsoft .NET Framework 4.7.1, and then select Uninstall/Change.
    3. Select Remove .NET Framework 4.7.1 from this computer, and then select Next. 
    4. Select Continue to confirm the uninstallation.
    5. Select Finish after the uninstallation is finished. 
    6. Restart your computer if you are prompted to do this.
Back to Top