Skip to content

The same assembly is loaded multiple times if it passed as multiple --custom-step arguments #1314

@rolfbjarne

Description

@rolfbjarne

The same assembly is loaded once for each --custom-step argument.

My guess is because it's loaded using the Assembly.Load(byte[]) overload: https://github.com/mono/linker/blob/da2cc0fcd6c3a8e8e5d1b5d4a655f3653baa8980/src/linker/Linker/Driver.cs#L723

This is quite confusing if you have static state in one step you expect to be around in subsequent steps (it also means that if I want to share state between steps, I have to resort to ugly workarounds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions