Skip to content

ILLink #2640

Answered by akoeplinger
tranb3r asked this question in Q&A
ILLink #2640
Jan 4, 2024 · 3 comments · 24 replies
Discussion options

You must be logged in to vote

@tranb3r another workaround that you can try in your project is to use an ILLink substitution xml to replace the static constructor body with an empty stub:

Create a file called substitution.xml

<linker>
  <assembly fullname="SixLabors.ImageSharp">
    <type fullname="SixLabors.ImageSharp.Configuration">
      <method signature="System.Void .cctor()" body="stub" />
    </type>
  </assembly>
</linker>

And add the following to your .csproj:

<_ExtraTrimmerArgs>--substitutions substitution.xml</_ExtraTrimmerArgs>

Replies: 3 comments 24 replies

Comment options

You must be logged in to vote
4 replies
@tranb3r
Comment options

@tranb3r
Comment options

@tranb3r
Comment options

@JimBobSquarePants
Comment options

Comment options

You must be logged in to vote
18 replies
@JimBobSquarePants
Comment options

@tranb3r
Comment options

@MichalStrehovsky
Comment options

@akoeplinger
Comment options

Answer selected by tranb3r
@tranb3r
Comment options

@MichalStrehovsky
Comment options

@tranb3r
Comment options

@JimBobSquarePants
Comment options

Comment options

You must be logged in to vote
2 replies
@MichalStrehovsky
Comment options

@tranb3r
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants