Added: Assembly Trimming Annotations for SharpGen.Runtime#222
Added: Assembly Trimming Annotations for SharpGen.Runtime#222jkoritzinsky merged 5 commits intoSharpGenTools:mainfrom
Conversation
|
Can you include also https://github.com/SharpGenTools/SharpGenTools/blob/main/SharpGen.Runtime.COM/SharpGen.Runtime.COM.csproj with those additions please? Overall looks goos |
I was actually confused about that part for a sec when working on this PR. I think that's a leftover from an earlier version, because a while back it seems like If you look at the code generated by newer versions of SharpGenTools, you'll see that it extends from |
|
No, SharpGen.Runtime.COM is still a thing (for IStream and various other utilities), but it's true that IUnknown and ComObject are now in SharpGen.Runtime to simplify architecture and build infra. |
|
In this case I'll probably do Then get back to annotating |
|
I noticed I forgot to conditional exclude packages in |

The following PR adds an initial set of IL Trimmer Annotations for
SharpGen.Runtime(and what is formerlySharpGen.Runtime.COM).Motivation
Enable IL trimming, or at the very least safe trimming of libraries that depend on
SharpGen.Runtime.Ideally, my personal end goal is to contribute to @amerkoleci 's Vortice.Windows, by adding Assembly Trimming support to the library.
Changes
net6.0target forSharpGen.Runtimewith full trimming support.net5.0, whereInterfacetrim is handled by preserving all.SharpGen.Runtime.Trim.Dummyproject for testing trimmability at publish time. [The analyzer isn't perfect yet]Areas of Note