Microsoft has issued optional updates to fix XPS in WPF-based apps

Net Framework Banner .net

In December 2022, Microsoft has released KB5022083, a security update that changes how .NET Framework and .NET handle XPS content. So many apps built with WPF started to render incorrectly. While Microsoft provided a workaround along with the release of the patch, the issue still affects plenty of users.

Due to the changes in .NET, XPS documents with structural or semantic elements like table structure, storyboards, or hyperlinks may not display correctly in WPF-based readers. It may also break inline images. The app that show the XPS data may throw Null reference exceptions when XPS documents are loaded into WPF-based readers.

As a workaround, Microsoft suggested running the following command as Administrator in cmd.exe:

reg add "HKLM\SOFTWARE\Microsoft\.NETFramework\Windows Presentation Foundation\XPSAllowedTypes" /v "DisableDec2022Patch" /t REG_SZ /d "*" /reg:64

Finally, the Redmond firm managed to resolve the issue with the following out-of-band updates. Note that none of them are available via Windows Update, so you have to install them manually.

Product Version Update
Windows 11, version 22H2
.NET Framework 4.8.1 Catalog 5023327
Windows 11, version 21H2 Catalog 5023367
.NET Framework 4.8 Catalog 5023323
.NET Framework 4.8.1 Catalog 5023320
Windows Server 2022 Catalog 5023368
.NET Framework 4.8 Catalog 5023324
.NET Framework 4.8.1 Catalog 5023321
Azure Stack HCI, version 22H2
.NET Framework 4.8 Catalog 5023324
Azure Stack HCI, version 21H2
.NET Framework 4.8 Catalog 5023324
Windows 10 Version 22H2 Catalog 5023366
.NET Framework 4.8 Catalog 5023322
.NET Framework 4.8.1 Catalog 5023319
Windows 10 Version 21H2 Catalog 5023365
.NET Framework 4.8 Catalog 5023322
.NET Framework 4.8.1 Catalog 5023319
Windows 10 Version 20H2 Catalog 5023364
.NET Framework 4.8 Catalog 5023322
.NET Framework 4.8.1 Catalog 5023319
Windows 10 1809 (October 2018 Update) and Windows Server 2019 Catalog 5023363
.NET Framework 4.7.2 Catalog 5023333
.NET Framework 4.8 Catalog 5023326
Windows 10 1607 (Anniversary Update) and Windows Server 2016 Catalog 5023416
.NET Framework 4.7.2 Catalog 5023332
.NET Framework 4.8 Catalog 5023325

Finally, if you are about to go with one of these KBs, it is a good idea to undo any workaround you have used before installing it. For the above mentioned command, you can run this undo command, again as Administrator:

reg delete "HKLM\SOFTWARE\Microsoft\.NETFramework\Windows Presentation Foundation\XPSAllowedTypes" /reg:64 /f

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.