Consider the following scenario:
- You have a touch device that is running Windows 7 Service Pack 1 (SP1) or Windows Server 2008 R2 SP1.
- Some Windows Presentation Framework (WPF) applications are running on the device.
- You install the May 2017 Preview of Quality Rollup for the .NET Framework 4.6, 4.6.1, and 4.6.2 (KB 4104606) on the device.
- You then install the .NET Framework 4.7 on the device.
In this scenario, the WPF applications fail and generate error messages that resemble the following message:
Exception type: System.TypeInitializationException
Message: The type initializer for 'MS.Win32.Penimc.UnsafeNativeMethods' threw an exception.
InnerException: System.Runtime.InteropServices.COMExceptionMessage of the inner exception: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
To work around this problem, uninstall and then reinstall the .NET Framework 4.7.
Uninstall the .NET Framework 4.7
- In Control Panel, click Uninstall a program in the Programs category.
- In the list of programs, locate and click Microsoft .NET Framework 4.7, and then click Uninstall/Change.
- In the .NET Framework 4.7 Maintenance wizard, click Remove.NET Framework 4.7 from this computer, and then click Next.
- If the following warning window appears, click Continue.
- Wait for the uninstallation to complete.
Reinstall the .NET Framework 4.7
To reinstall the Microsoft .NET Framework 4.7, use one of the following methods.
Method 1: Manually download and install the .NET Framework 4.7
- Download the web installer for the .NET Framework 4.7.
- Install the .NET Framework 4.7.
Method 2: Use Windows Update to install the .NET Framework 4.7
- Open Windows Update.
- Click Check online for updates from Windows Update.
- After the search for updates is complete, click Optional Updates available.
- Locate and select Microsoft .NET Framework for Windows 7 and Windows Server 2008 R2, and then click OK.
- Wait for the installation to complete.
Microsoft is working on a resolution to this problem.
Article ID: 4033488 - Last Review: 29.6.2017 - Revision: 11