Skip to content

Remove Microsoft.DotNet.CilStrip.Sources from runtime-assets #383

Open

Description

@ViktorHofer

https://github.com/dotnet/runtime-assets/blob/main/src/Microsoft.DotNet.CilStrip.Sources/README.md mentions that Microsoft.DotNet.CilStrip.Sources is a temporary copy and will be replaced during .NET 7.

Can these sources now be removed from the repository?

cc @steveisok

Activity

  1. steveisok commented on Nov 8, 2023

    @steveisok
    Member

    @akoeplinger @fanyang-mono I think the readme should at least be updated. Do you think we can have an ILStrip replacement in .NET 9?

  2. fanyang-mono commented on Nov 8, 2023

    @fanyang-mono
    Member

    If the functionality of writing a modified assembly to file and validating the new assembly are implemented, then probably yes.

  3. lewing commented on Feb 9, 2024

    @lewing
    Member

    what is the status here?

  4. steveisok commented on Feb 9, 2024

    @steveisok
    Member

    This one is tough because modern cecil rewrites tokens and aot images rely on exact values. Here's what I see our options are in .NET 9:

    1. An API like Efficient API to stream from a MetadataReader to a MetadataBuilder with modifications runtime#30443 lands and we're able to use it

    2. @vargaz does something creative with the ILStrip tool emitting a remapping table and the runtime uses it to remap

    3. We do nothing until an adequate API lands

  5. lewing commented on Feb 9, 2024

    @lewing
    Member
  6. akoeplinger commented on Feb 9, 2024

    @akoeplinger
    Member

    Another (cheap) option that we discussed is using the functionality @fanyang-mono introduced in IlStrip which zeroes out method bodies for all methods instead of a subset, this feature only relies on SRM. It'd make the binary size on disk larger but the compressed size probably stays similar.

  7. clin1234 commented on Oct 2, 2026

    @clin1234
    Contributor

    Any update on this issue?

  8. akoeplinger commented on Oct 2, 2026

    @akoeplinger
    Member

    we can actually do this now in .NET 12 since this code is used in ILStrip only for Mono-related cases and those go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions