From dac93066c5c03fb755c343257fb9f1d52b738065 Mon Sep 17 00:00:00 2001 From: "Maria Manolova (INFRAGISTICS INC)" Date: Tue, 26 May 2026 12:40:57 +0300 Subject: [PATCH 1/2] Package ijwhost.dll as native asset for self-contained publish After the /clr:pure to /clr:NetCore migration (#11575), DirectWriteForwarder and System.Printing became mixed-mode C++/CLI assemblies that require ijwhost.dll at runtime. The DLL was being placed in the managed lib/ folder where it is not recognized by RuntimeList.xml, causing it to be missing from self-contained publish output. Exclude ijwhost.dll from the lib/ packaging and add it as a native asset under runtimes/win-{arch}/native/ so it is properly included in the runtime pack manifest. Fixes #11651 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../DirectWriteForwarder.vcxproj | 20 ++++++++++++++++++- .../System.Printing/System.Printing.vcxproj | 20 ++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/DirectWriteForwarder.vcxproj b/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/DirectWriteForwarder.vcxproj index fa961964860..4c7e1aad485 100644 --- a/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/DirectWriteForwarder.vcxproj +++ b/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/DirectWriteForwarder.vcxproj @@ -92,7 +92,25 @@ - + + + + + + + <_IjwHostNativeDestFolder Condition="'$(Platform)'=='AnyCPU' or '$(Platform)'=='x86' or '$(Platform)'=='Win32'">runtimes\win-x86\native\ + <_IjwHostNativeDestFolder Condition="'$(Platform)'=='x64'">runtimes\win-x64\native\ + <_IjwHostNativeDestFolder Condition="'$(Platform)'=='arm64'">runtimes\win-arm64\native\ + + + + + diff --git a/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj b/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj index 16c743024d6..dac303d328a 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj +++ b/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj @@ -161,7 +161,25 @@ - + + + + + + + <_IjwHostNativeDestFolder Condition="'$(Platform)'=='AnyCPU' or '$(Platform)'=='x86' or '$(Platform)'=='Win32'">runtimes\win-x86\native\ + <_IjwHostNativeDestFolder Condition="'$(Platform)'=='x64'">runtimes\win-x64\native\ + <_IjwHostNativeDestFolder Condition="'$(Platform)'=='arm64'">runtimes\win-arm64\native\ + + + + + <_defineReferences>@(_defineReference->'%(Define)=<%(Identity)>') From 9b4e90b00dfd3a9746079f14355ec40331156e43 Mon Sep 17 00:00:00 2001 From: "Maria Manolova (INFRAGISTICS INC)" Date: Mon, 1 Jun 2026 12:23:49 +0300 Subject: [PATCH 2/2] Move ijwhost.dll packaging logic to Packaging.targets Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/WpfArcadeSdk/tools/Packaging.targets | 22 +++++++++++++++++++ .../DirectWriteForwarder.vcxproj | 20 +---------------- .../System.Printing/System.Printing.vcxproj | 20 +---------------- 3 files changed, 24 insertions(+), 38 deletions(-) diff --git a/eng/WpfArcadeSdk/tools/Packaging.targets b/eng/WpfArcadeSdk/tools/Packaging.targets index 20956d37781..a069bdc8c70 100644 --- a/eng/WpfArcadeSdk/tools/Packaging.targets +++ b/eng/WpfArcadeSdk/tools/Packaging.targets @@ -89,6 +89,21 @@ $(PreparePackageAssetsDependsOn): runtimes\win-arm64\native\ + + + runtimes\win-x86\native\ + runtimes\win-x64\native\ + runtimes\win-arm64\native\ + + + + + + + + + + - - - - - - <_IjwHostNativeDestFolder Condition="'$(Platform)'=='AnyCPU' or '$(Platform)'=='x86' or '$(Platform)'=='Win32'">runtimes\win-x86\native\ - <_IjwHostNativeDestFolder Condition="'$(Platform)'=='x64'">runtimes\win-x64\native\ - <_IjwHostNativeDestFolder Condition="'$(Platform)'=='arm64'">runtimes\win-arm64\native\ - - - - - + diff --git a/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj b/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj index dac303d328a..3bb8c085842 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj +++ b/src/Microsoft.DotNet.Wpf/src/System.Printing/System.Printing.vcxproj @@ -161,25 +161,7 @@ - - - - - - - <_IjwHostNativeDestFolder Condition="'$(Platform)'=='AnyCPU' or '$(Platform)'=='x86' or '$(Platform)'=='Win32'">runtimes\win-x86\native\ - <_IjwHostNativeDestFolder Condition="'$(Platform)'=='x64'">runtimes\win-x64\native\ - <_IjwHostNativeDestFolder Condition="'$(Platform)'=='arm64'">runtimes\win-arm64\native\ - - - - - + <_defineReferences>@(_defineReference->'%(Define)=<%(Identity)>')