Skip to content

Commit

Permalink
Preserver COM Interop when trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Nov 28, 2023
1 parent 9006c03 commit cfa6d92
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions CollapseLauncher/CollapseLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@

<!-- Fix a crash due to property: PropertyPath went missing on ILTrimming -->
<TrimmerRootDescriptor Include="NonTrimmableRoots.xml" />
<TrimmerRootDescriptor Include="TrimmerDescriptor.xml" />

<!--
<TrimmerRootAssembly Include="CommunityToolkit.WinUI" />
Expand Down
9 changes: 9 additions & 0 deletions CollapseLauncher/TrimmerDescriptor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="CollapseLauncher.dll">

Check warning on line 3 in CollapseLauncher/TrimmerDescriptor.xml

View workflow job for this annotation

GitHub Actions / build (Release, x64, net8.0-windows10.0.22621.0)

Could not resolve assembly 'CollapseLauncher.dll'.
<type fullname="CollapseLauncher.PInvoke">
<!-- Preserve COM Interop used in project code when trimming -->
<method signature="System.Object CoCreateInstance(System.Guid*, System.Object, CLSCTX, System.Guid*, out System.Object)" />
</type>
</assembly>
</linker>
9 changes: 1 addition & 8 deletions Hi3Helper.Core/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"version": 1,
"dependencies": {
"net8.0": {
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "B3etT5XQ2nlWkZGO2m/ytDYrOmSsQG1XNBaM6ZYlX5Ch/tDrMFadr0/mK6gjZwaQc55g+5+WZMw4Cz3m8VEF7g=="
},
"Google.Protobuf": {
"type": "Transitive",
"resolved": "3.25.1",
Expand All @@ -29,7 +23,6 @@
"hi3helper.http": {
"type": "Project"
}
},
"net8.0/win-x64": {}
}
}
}

0 comments on commit cfa6d92

Please sign in to comment.