From 60df3cbdcc44342d32079703a6be70522a94e137 Mon Sep 17 00:00:00 2001 From: "Claude (Initial Force WPF Bot)" Date: Thu, 13 Aug 2026 10:01:48 +0200 Subject: [PATCH] fix(packaging): inject patched WPF into self-contained publish output The Build-time InjectIfWpfAssemblies target adds the patched WPF DLLs to ResolvedFileToPublish, but a self-contained publish recomputes that list in ComputeResolvedFilesToPublishList after the Build-time targets have run, and re-adds the runtime-pack stock WPF DLLs. The published app - which the MotionCatalyst installer harvests - therefore shipped stock Microsoft WPF, making the fork inert in the shipped product; only local dotnet build output carried the patched DLLs. Add ReplaceWpfInPublish, hooked AfterTargets=ComputeResolvedFilesToPublishList and BeforeTargets=CopyFilesToPublishDirectory, to strip the stock WPF entries and inject the patched copies at the point that wins. Verified locally: a self-contained Release publish of MotionCatalyst now emits fork PresentationCore, PresentationFramework, WindowsBase and System.Xaml (sha256-matched to the package runtimes copy). Co-Authored-By: Claude Opus 4.8 --- .../buildTransitive/InitialForce.WPF.targets | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/packaging/InitialForce.WPF/buildTransitive/InitialForce.WPF.targets b/packaging/InitialForce.WPF/buildTransitive/InitialForce.WPF.targets index 726b7c5a006..d6dde5c173c 100644 --- a/packaging/InitialForce.WPF/buildTransitive/InitialForce.WPF.targets +++ b/packaging/InitialForce.WPF/buildTransitive/InitialForce.WPF.targets @@ -125,4 +125,41 @@ Condition="'$(RuntimeIdentifier)' == 'win-x64'" /> + + + + + + PresentationCore.dll + Always + + + PresentationFramework.dll + Always + + + WindowsBase.dll + Always + + + System.Xaml.dll + Always + + + + +