Posted 15 September 2026, 5:03 am EST
Hi Uttkarsh,
Do you mean this feature? https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options
If yes: for testing, I set
<PublishTrimmed>true</PublishTrimmed>
in our background service project and received a lot of warnings from a bunch of nuget packages.
Some of them originate from “C1.Win.Printing”.
To reproduce: attached is a small sample: PrintingTestApp.zip
In the sample dir, run “dotnet publish” with this command:
dotnet publish -r win-x64 --self-contained true -c Release
It will print those warnings:
C:\Users\USERNAME\.nuget\packages\c1.win.printing\10.0.20261.813\lib\net10.0-windows7.0\C1.PrintDocument.10.dll : warning IL2104: Assembly 'C1.PrintDocument.10' produced trim warnings. For more information see https://aka.ms/il2104
C:\Users\USERNAME\.nuget\packages\c1.win\10.0.20261.813\lib\net10.0-windows7.0\C1.Win.10.dll : warning IL2104: Assembly 'C1.Win.10' produced trim warnings. For more information see https://aka.ms/il2104
Do you know what this means ;-)? But it seems trimming is no option for us because of too many warnings.
Best regards
Wolfgang