Code Monkey home page Code Monkey logo

il-repack's Introduction

Build status Build Status NuGet GitHub license
Gitter chat

Introduction

ILRepack is meant at replacing ILMerge / Mono.Merge.

The former being closed-source, impossible to customize, slow, resource consuming and many more. The later being deprecated, unsupported, and based on an old version of Mono.Cecil.

Here we're using latest (slightly modified) Cecil sources (0.9), you can find the fork here. Mono.Posix is also required (build only, it gets merged afterwards) for executable bit set on target file.

Downloads

You can grab it using NuGet.

Or if you're old-school (and want to stay like that), this direct link will give you the latest nupkg file, which you can open as a zip file.

Syntax

A console application is available (can be used as DLL as well), using same syntax as ILMerge:

Syntax: ILRepack.exe [options] /out:<path> <path_to_primary> [<other_assemblies> ...]

 - /help                displays this usage
 - /keyfile:<path>      specifies a keyfile to sign the output assembly
 - /keycontainer:<name> specifies a key container to sign the output assembly (takes precedence over /keyfile)
 - /log:<logfile>       enable logging (to a file, if given) (default is disabled)
 - /ver:M.X.Y.Z         target assembly version
 - /union               merges types with identical names into one
 - /ndebug              disables symbol file generation
 - /copyattrs           copy assembly attributes (by default only the primary assembly attributes are copied)
 - /attr:<path>         take assembly attributes from the given assembly file
 - /allowMultiple       when copyattrs is specified, allows multiple attributes (if type allows)
 - /target:kind         specify target assembly kind (library, exe, winexe supported, default is same as first assembly)
 - /targetplatform:P    specify target platform (v1, v1.1, v2, v4 supported)
 - /xmldocs             merges XML documentation as well
 - /lib:<path>          adds the path to the search directories for referenced assemblies (can be specified multiple times)
 - /internalize         sets all types but the ones from the first assembly 'internal'
 - /delaysign           sets the key, but don't sign the assembly
 - /usefullpublickeyforreferences - NOT IMPLEMENTED
 - /align               - NOT IMPLEMENTED
 - /closed              - NOT IMPLEMENTED
 - /allowdup:Type       allows the specified type for being duplicated in input assemblies
 - /allowduplicateresources allows to duplicate resources in output assembly (by default they're ignored)
 - /zeropekind          allows assemblies with Zero PeKind (but obviously only IL will get merged)
 - /wildcards           allows (and resolves) file wildcards (e.g. `*`.dll) in input assemblies
 - /parallel            use as many CPUs as possible to merge the assemblies
 - /pause               pause execution once completed (good for debugging)
 - /verbose             shows more logs
 - /out:<path>          target assembly path, symbol/config/doc files will be written here as well
 - <path_to_primary>    primary assembly, gives the name, version to the merged one
 - <other_assemblies>   ...

Note: for compatibility purposes, all options can be specified using '/', '-' or '--' prefix.

How to build

Builds directly from within Visual Studio 2015, or using gradle:

git clone --recursive https://github.com/gluck/il-repack.git
cd il-repack
gradlew.bat msbuild

(Mono.Posix 3.5-compatible dependency was grabbed from a non-standard nuget repo, it has been commited to git to avoid the dependency on this repo)

TODO

  • Crash-testing
  • Add remaining features from ILMerge (closed / align)
  • Un-fork Cecil
  • Merge import process & reference fixing

DONE

  • PDBs & MDBs should be merged (Thanks Simon)
  • Fixed internal method overriding public one which isn't allowed in the same assembly (Simon)
  • Attribute merge (/copyattrs)
  • XML documentation merge
  • Clean command line parameter parsing
  • Add usage / version
  • App.config merge
  • Internalizing types (Simon)
  • Delay signing (Simon)
  • Target platform selection (Simon)
  • Automatic internal type renaming

Sponsoring / Donations

If you like this tool and want to express your thanks, you can contribute either time to the project (issue triage or pull-requests) or donate money to the Free Software Foundation.

Donate

il-repack's People

Contributors

adescamps-ullink avatar adrianrus avatar devitalio avatar eatdrinksleepcode avatar emanuelvarga avatar gitter-badger avatar gluck avatar goldsimon avatar haf avatar hazzik avatar jnm2 avatar kzu avatar micahzoltu avatar mzboray avatar pliner avatar rhautefeuille avatar romainhautefeuille avatar tephe avatar thejuan avatar timotei avatar undeadcat avatar vbfox avatar xen2 avatar zippy1981 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.