presentationbuildtasks.dll Error in Windows 10 and 11: WPF project build tasks

A WPF project may fail compiling XAML during a build that previously succeeded in the same solution.
The Windows file inventory identifies presentationbuildtasks.dll as PresentationBuildTasks.dll. Capture the actual error, file path and Windows build before making changes.
Check where the error occurs
Check the project target Framework and Visual Studio workload. Try a clean build of a small supported WPF sample using the same toolchain.
Capture the first XAML build error before changing targets. In a project copy, note the targeted framework, build configuration, and first failing markup task. Microsoft’s WPF build task reference describes the relevant stages. After repair, rebuild the same configuration and verify the affected XAML compiles and the view opens.
Repair the affected feature
Use Visual Studio Installer or the official SDK to repair the matching desktop workload and targeting pack. Preserve project source files.
If Windows reports corruption of a protected system file, use Microsoft’s system file repair procedure. Obtain software and drivers through Windows Update or the applicable publisher.
Verify the repair
Rebuild the original project and verify a representative XAML view opens after launch.
See the publisher’s guidance, the exact Windows file record, and the related PC Repair Atlas guide.