Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Emile Badenhorst
    How does your C# interface work ?
    Timotei Dolean
    @MyvarHD What do you mean?
    How it's used?
    You just need to instantiate the ILRepack class and provide the options (either via the IEnumerable<string> parameter args, or manually settings things on RepackOptions)
    Then just call .Repack()
    Emile Badenhorst
    Nm i figures it out, if there is ever any small tasks you need done let me know i whould be happy to help out
    Paolo Ghibaudo
    hi all
    how can I use ilrepack.exe as commandline like ilmerge to pack a .exe and some .dlls?
    Timotei Dolean
    @ghiboz Well, the same way you use ILMerge. Usually it's enough to invoke ILRepack.exe instead of ILMerge.exe since ILRepack maintains the same parameters
    Paolo Ghibaudo
    @timotei thanks!! I'll try! :)
    Paolo Ghibaudo
    @timotei thanks! it works very fine!!!
    Paolo Ghibaudo
    hello all!
    I've got a question:
    I wish merge my .exe with devexpress dll, and if I do this, when I run the program appears this error:
    taht means that a type is present in the dll that I wish pack and my exe....
    the code is this:
    ilrepack.exe /wildcards /parallel /union /copyattrs /allowMultiple /targetplatform:v2 /log:merged\log.txt /out:merged\ReportDesigner.exe ReportDesigner.exe DevExpress*.dll
    thanks in advance
    and that's the log..
    Timotei Dolean
    Does it find the specified type/namespace in the merged assembly? (e.g., if you open it with a decompiler like ILSpy)
    Paolo Ghibaudo
    I'll try
    Paolo Ghibaudo
    yes, it find
    Peter Taylor
    Any suggestion on how to debug this error:
    System.ArgumentException: Resources_StreamNotValid
       at ILRepacking.ResReader..ctor(Stream stream)
       at ILRepacking.Steps.ResourcesRepackStep.FixResxResource(AssemblyDefinition containingAssembly, EmbeddedResource er,
    List`1 resourcePrcessors, IEmbeddedResourceProcessor embeddedResourceProcessor)
       at ILRepacking.Steps.ResourcesRepackStep.Perform()
       at ILRepacking.ILRepack.Repack()
       at ILRepacking.Application.Main(String[] args)
    Timotei Dolean
    @josephgardner Do you have the complete log? it looks to me like some... unknown/unhandle-able resource
    If you want to dig into the issue, you could run il-repack with VS + use the same arguments & working dir you use when launching it, and see what's the issue
    Joseph Musser

    When I specify /keyfile, I get:

    System.ArgumentException: Unable to obtain public key for StrongNameKeyPair.
    at System.Reflection.StrongNameKeyPair.ComputePublicKey()
    at System.Reflection.StrongNameKeyPair.get_PublicKey()
    at ILRepacking.Steps.SigningStep.Perform()
    at ILRepacking.ILRepack.Repack()
    at ILRepacking.Application.Main(String[] args)

    Very much like the same issue with ILMerge which signs properly if run as 32-bit using corflags, but by default gives this:

    An exception occurred during merging:
    An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
    at System.Compiler.Writer.MscorsnStrongNameSignatureGeneration(String wszFilePath, String wszKeyContainer, Byte[] pbKeyBlob, Int32 cbKeyBlob, IntPtr ppbSignatureBlob, IntPtr pcbSignatureBlob)
    at System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols, Module module, Boolean delaySign, String keyFileName, String keyName)
    at System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Module module)
    at ILMerging.ILMerge.Merge()
    at ILMerging.ILMerge.Main(String[] args)

    I thought the corflags /32bit+ trick might work on ILRepack as well as ILMerge, but ILRepack acts the same both in 64-bit and 32-bit.
    Joseph Musser
    Sergiy Nikolayev
    Is il-repack capable of merging .net core/.net standard assemblies?
    Joseph Musser
    Well it can't handle the portable PDB format yet so I expect not. (gluck/il-repack#197)
    Hello, I was wondering if being able to select symbols to repack was something doable ? Ideally all used symbols would be auto detected but being able to give a list as input would be enough in my case.
    Rohit Agrawal
    @gluck could you take a peek at gluck/il-repack#225
    Hi all, I'm still running into some issues for about a year now: gluck/il-repack#203
    I tested this with ILMerge where it works fine. So for now I'll be switching to that :)
    But if someone manages to figure out how to fix this, let me know.
    Anatoly Ubiyko
    Hi! I am unable to use ILRepack with MaterialDesignInXamlToolkit. If I merge MainDemo.Wpf, XamlParseException is thrown at start. 'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Inner exception: XamlParseException: Type reference cannot find type named '{http://materialdesigninxaml.net/winfx/xaml/themes}DialogHost'.

    jo I'm trying to run a simple example of repacking to dlls, this is the output:
    ~/repos/csharp $ /home/benj/.nuget/packages/ilrepack/2.0.18/tools/ILRepack.exe Il-pack-sample/bin/Debug/netcoreapp3.1/Il-pack-sample.dll /out:Il-pack-sample/best-out.dll
    INFO: IL Repack - Version 2.0.18
    INFO: ------------- IL Repack Arguments -------------

    /out:Il-pack-sample/best-out.dll Il-pack-sample/bin/Debug/netcoreapp3.1/Il-pack-sample.dll

    INFO: Adding assembly for merge: Il-pack-sample/bin/Debug/netcoreapp3.1/Il-pack-sample.dll
    ERROR: Failed to load assembly Il-pack-sample/bin/Debug/netcoreapp3.1/Il-pack-sample.dll
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000f7] in <fa257496929944d3922e0349a0420534>:0
    at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00007] in <fa257496929944d3922e0349a0420534>:0