Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Framework January 2018 Rollup Known Issue KB4074906 - "TypeInitializationException" or "FileFormatException" error in WPF applications #53

Open
richlander opened this issue Jan 12, 2018 · 0 comments

Comments

@richlander
Copy link
Member

richlander commented Jan 12, 2018

.NET Framework January 2018 Monthly Rollup Known Issue KB4074906 - "TypeInitializationException" or "FileFormatException" error in WPF applications

Updated: January 24, 2018

An issue has been found in the .NET Framework January 2018 Security and Quality Rollup (KB 4055002), applicable to .NET Framework 4.7.1 installed on either Windows 7 and Windows Server 2008 R2.

The .NET team has fixed the issue and re-released the January 2018 Monthly Rollup for affected Windows versions as KB 4074880. Affected machines can be fixed by using one of the solutions described later in the document.

This document describes the symptoms and solutions to resolve the issue.

The .NET Framework January 2018 Monthly Rollup Announcement blog post has been updated with this information.

Discussion

Please share your thoughts on this change and see what others are saying at:

Applicability

This issue applies to Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1 machines. Users that install the following products/updates in the following order will experience this issue.

Symptoms

Windows Presentation Foundation (WPF) 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

Solutions

To work around this problem, use one of the following methods. We recommend the first option. The other options are provided in the unlikely case that the first option doesn't work for you.

Solution 1 - Run Fixit tool for KB4074906

Microsoft has released a Fixit tool for KB4074906, available on Windows Update, WSUS, Microsoft Update Catalog, and as a direct download.

The tool replaces the corrupted font file with the correct version.

The easiest approach is to get the tool via Windows Update or WSUS. If you download and run the tool directly, please follow these instructions.

  • Close any open running applications, particularly if you know that they use the .NET Framework.
  • Execute the tool from an Administrator command prompt (will prompt for Administrator permissions otherwise).
  • Re-launch your .NET Framework application(s) and note that the issue has been resolved.

Important Notes:

  • The Fixit tool is only meant to be used on affected systems. It will only complete the repair work on systems that match the applicability and symptoms described above.
  • If you are running the tool programmatically and/or want to check for success status via tool return codes, launch the tool as a new process and wait for it to terminate (e.g. “start /wait FixItTool-KB4074906.exe”). Depending on your systems management environment this may happen by default.

You can use the following commands to run the tool and determine the return code.

C:\KB4074906>start /wait FixItTool-KB4074906.exe
C:\KB4074906>echo %errorlevel%

The follow table lists the error codes that the tool outputs:

Case Code
Success 0
Copy Error 2
File in Use 33
Generic Error 1603
NotApplicable 20160

Solution 2 - Uninstall and re-install the January 2018 Monthly Rollup

The January 2018 Monthly Rollup has been re-released with a fix for this known issue. You will have a working system if you uninstall the initial Monthly Rollup (KB 4055002) and instead install updated January 2018 Monthly Rollup (KB 4074880).

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 and Quality Rollup 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 so.
  5. Download and install the Monthly Rollup 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 4074880) for your operating system configuration from the following links:
  6. Follow the installation prompts, and then restart your computer if your are prompted to do this.

Solution 3 - Replace GlobalUserInterface.CompositeFont Manually

Manually replace corrupted font file with correct version.

  1. Download GlobalUserInterface.CompositeFont (default download for Windows 7 is %USERPROFILE%\Downloads).
  2. Launch cmd as Administrator and navigate to %windir%\Microsoft.NET\Framework\v4.0.30319\WPF\Fonts and run:
    xcopy /y %USERPROFILE%\Downloads\GlobalUserInterface.CompositeFont .
    (or copy and paste the GlobalUserInterface.Composite file through Windows Explorer to %windir%\Microsoft.NET\Framework\v4.0.30319\WPF\Fonts)
  3. Launch cmd as Administrator and navigate to %windir%\Microsoft.NET\Framework64\v4.0.30319\WPF\Fonts and run:
    xcopy /y %USERPROFILE%\Downloads\GlobalUserInterface.CompositeFont .
    (or copy and paste the GlobalUserInterface.Composite file through Windows Explorer to %windir%\Microsoft.NET\Framework64\v4.0.30319\WPF\Fonts).
  4. Re-launch WPF application.
  5. Reboot machine and re-launch application if you still have trouble.

Root Cause

The root cause of this problem is a MSI setup interaction between the .NET Framework January 2018 Rollup (KB4055002) and an already installed version of .NET Framework 4.7.1 product. The Rollup installer unexpectedly overwrites the 4.7.1 version of the GlobalUserInterface.CompositeFont file. This causes WPF operations that need this font file to fail.

All updates are extensively tested before they are provided to you. We are investigating the gap in our testing and will resolve that for our next release.

Issue Reports

@dotnet dotnet locked and limited conversation to collaborators Jan 12, 2018
@richlander richlander added the PSA label Jan 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant