dotnet / dotnet/core

Support Trimming over a set of output binaries rather than just a single one

Open
#5,189 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
22k
Forks
4.9k
Avg merge
5d 5h
Merged PRs (30d)
29

Description

# Issue Title

Support Trimming over a set of output binaries rather than just a single one

# General

Apologies if this is the wrong repo to file this feature request in. I kind of think this is a wide-scope issue.

We've been looking at different things when planning the migration from .net core 3.1 to .net core 5.

Our current build process publishes a bunch of different exe packages, then goes through the published output and gathers up the output files, recreates the nuget directory for anything that looks like a nuget package (turns out to include all the runtime packs), and and resolves all other files that are of the same name in the manner of "choose any", under the assumption these are all our own projects in the build and so really are all the same version. All the files get written back out to the same target directory at the end.

At this point it looks like it's probably worthwhile to abandon the recasting of the nuget packages in favor of shipping trimmed runtime binaries; however this would entail being able to run the trim process over an already amalgamated publish output directory of several published executable packages. I know how to amalgamate package outputs; you shouldn't have to worry about that.

What I don't see how to do is run the trim process on the amalgamated package directory; the package resolution process clearly requires all copies of the same dll be interchangeable, and that clearly won't be true for trimmed framework binaries. It's almost like it should be ran over a project that just depends on all the other projects, but the code generation isn't quite right. (No file .deps.json file so the static loader isn't happy at all.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.