Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Microsoft.DotNet.Wpf/src/PresentationCore/ILLinkTrim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<linker>
<!-- Include dependencies of DirectWriteForwarder, which is not
analyzed by the linker. -->
<assembly fullname="System.Diagnostics.Debug" />
<assembly fullname="mscorlib" />
<assembly fullname="netstandard" />
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,29 @@
<XlfInput>false</XlfInput>
<ManifestResourceName>ColorProfiles</ManifestResourceName>
</EmbeddedResource>

<!--
Workaround for https://github.com/dotnet/wpf/issues/1385
ReadyToRun images of WPF applications crash

When producing ReadyToRun images, the ILLinker is configured to skip
C++/CLI images. See https://github.com/mono/linker/issues/651 and
https://github.com/mono/linker/pull/658.

In turn, this results in the failure of the dependencies of such assemblies from being
identified and included in the ReadyToRun images.

This linker hint exists to ensure that such dependencies are included. We need
to place these hints in an assembly that has a reference to the corresponding
C++/CLI assembly.

PresentationCore -> DirectWriteFowarder
ReachFramework -> System.Printing
-->
<EmbeddedResource Condition="Exists('ILLinkTrim.xml')" Include="ILLinkTrim.xml">
<XlfInput>false</XlfInput>
<LogicalName>$(AssemblyName).xml</LogicalName>
</EmbeddedResource>
</ItemGroup>

<!-- Including the Microsoft.TextTemplating.targets requires us to manually import Sdk.Targets because
Expand Down
7 changes: 7 additions & 0 deletions src/Microsoft.DotNet.Wpf/src/ReachFramework/ILLinkTrim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<linker>
<!-- Include dependencies of System.Printing, which is not
analyzed by the linker. -->
<assembly fullname="System.Diagnostics.Debug" />
<assembly fullname="mscorlib" />
<assembly fullname="netstandard" />
</linker>
23 changes: 23 additions & 0 deletions src/Microsoft.DotNet.Wpf/src/ReachFramework/ReachFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@
<LogicalName>System.Printing.resources</LogicalName>
<ManifestResourceName>System.Printing.resources</ManifestResourceName>
</EmbeddedResource>

<!--
Workaround for https://github.com/dotnet/wpf/issues/1385
ReadyToRun images of WPF applications crash

When producing ReadyToRun images, the ILLinker is configured to skip
C++/CLI images. See https://github.com/mono/linker/issues/651 and
https://github.com/mono/linker/pull/658.

In turn, this results in the failure of the dependencies of such assemblies from being
identified and included in the ReadyToRun images.

This linker hint exists to ensure that such dependencies are included. We need
to place these hints in an assembly that has a reference to the corresponding
C++/CLI assembly.

PresentationCore -> DirectWriteFowarder
ReachFramework -> System.Printing
-->
<EmbeddedResource Condition="Exists('ILLinkTrim.xml')" Include="ILLinkTrim.xml">
<XlfInput>false</XlfInput>
<LogicalName>$(AssemblyName).xml</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
Expand Down