perf: enable .NET sidecar trimming and single-file publish

- Enable PublishTrimmed with TrimMode=partial to remove unused
  framework assemblies while preserving app/SDK code safety
- Enable PublishSingleFile to bundle all managed assemblies into
  one executable (sidecar goes from 254 files to 2 files)

Sidecar shrinks from 191 MB / 254 files to 134 MB / 2 files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-26 12:22:30 +01:00
co-authored by Copilot
parent d1cc3c2e6d
commit da7aa5cdd2
+3
View File
@@ -56,6 +56,9 @@ await runCommand(
'true',
'-p:DebugType=None',
'-p:DebugSymbols=false',
'-p:PublishTrimmed=true',
'-p:TrimMode=partial',
'-p:PublishSingleFile=true',
'-o',
outputDirectory,
],