Is it possible to only merge a subset of dependencies using ILMerge?

后端 未结 3 2146
广开言路
广开言路 2021-01-04 10:28

I\'m trying something exploratory:

Say I have a library \"coolproject\" and it has dependencies to one.dll, two.dll, and three.dll

3条回答
  •  佛祖请我去吃肉
    2021-01-04 11:00

    I have written a little tool to deal with this.

    The source code can be found @ https://github.com/leppie/ReferenceRemover.

    In you case it will be used as:

    ReferenceRemover three.dll "(one|two).*" coolproject.dll
    

    Explanation of args:

    1. Assembly to inspect
    2. Regex to match references
    3. The assembly it need to redirect to

    The output is three.dll with its references adjusted.

提交回复
热议问题