ILMerge StackOverflow Exception

Kevin Brydon

I am trying to run ILMerge to combine my own assembly with three third party assemblies.

var ilmerge = new ILMerging.ILMerge();

ilmerge.SetInputAssemblies(new string[] {
    @"C:\dev\MyAssembly.dll",
    @"C:\dev\Nest.dll",
    @"C:\dev\Elasticsearch.Net.dll",
    @"C:\dev\Newtonsoft.Json.dll"
});

ilmerge.OutputFile = @"C:\dev\MyAssembly.Merged.dll";

ilmerge.Merge();

And am getting the following exception

An unhandled exception of type 'System.StackOverflowException' occurred in ILMerge.exe

How can I solve this?

Kevin Brydon

In my case, a blog post by Stephen Cleary gives the answer. The .SetTargetPlatform(string, string); method should be used as below.

var ilmerge = new ILMerging.ILMerge();

ilmerge.SetInputAssemblies(new string[] {
    @"C:\dev\MyAssembly.dll",
    @"C:\dev\Nest.dll",
    @"C:\dev\Elasticsearch.Net.dll",
    @"C:\dev\Newtonsoft.Json.dll"
});

ilmerge.SetTargetPlatform("v4", @"C:\Windows\Microsoft.NET\Framework\v4.0.30319");

ilmerge.OutputFile = @"C:\dev\MyAssembly.Merged.dll";

ilmerge.Merge();

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Stackoverflow Exception in Gson

From Dev

Stackoverflow Exception in Recursion

From Dev

StackOverflow exception in a recursive method

From Dev

Stackoverflow exception - multiple calculation

From Dev

Json (fasterxml) stackoverflow exception

From Dev

DataGrid WPF StackOverFlow Exception

From Dev

Stackoverflow exception with Savefiledialog

From Dev

Stackoverflow Exception closing Form

From Dev

Why it is a StackOverFlow Exception?

From Dev

Stackoverflow exception - multiple calculation

From Dev

Stackoverflow Exception when serializing class

From Dev

StackOverflow Exception from get and set

From Dev

Restart IIS after Stackoverflow Exception

From Dev

StackOverFlow - Exception? I can't found the reason :-(

From Dev

Why this code does not throw StackOverflow exception

From Dev

Eclipse Luna StackOverflow exception at Build Time

From Dev

InitializeComponent fires StackOverflow Exception when binding

From Dev

simple WPF data binding results in StackOverFlow exception

From Dev

Protobuf-net StackOverflow exception with Derived Types

From Dev

RaisePropertyChanged throwing a StackOverflow Exception on TwoWay Bound property

From Dev

Why does this property cause a StackOverFlow exception?

From Dev

Find a value in a binary tree avoiding stackoverflow exception

From Dev

JSF Backing Component - Composite Component - Stackoverflow Exception

From Dev

Stackoverflow exception when comparing two dynamic types

From Dev

StackOverflow exception in my F# code

From Dev

StackOverFlow-Exception after changing value of Property

From Dev

Eclipse Luna StackOverflow exception at Build Time

From Dev

InitializeComponent fires StackOverflow Exception when binding

From Dev

Why does this property cause a StackOverFlow exception?

Related Related

  1. 1

    Stackoverflow Exception in Gson

  2. 2

    Stackoverflow Exception in Recursion

  3. 3

    StackOverflow exception in a recursive method

  4. 4

    Stackoverflow exception - multiple calculation

  5. 5

    Json (fasterxml) stackoverflow exception

  6. 6

    DataGrid WPF StackOverFlow Exception

  7. 7

    Stackoverflow exception with Savefiledialog

  8. 8

    Stackoverflow Exception closing Form

  9. 9

    Why it is a StackOverFlow Exception?

  10. 10

    Stackoverflow exception - multiple calculation

  11. 11

    Stackoverflow Exception when serializing class

  12. 12

    StackOverflow Exception from get and set

  13. 13

    Restart IIS after Stackoverflow Exception

  14. 14

    StackOverFlow - Exception? I can't found the reason :-(

  15. 15

    Why this code does not throw StackOverflow exception

  16. 16

    Eclipse Luna StackOverflow exception at Build Time

  17. 17

    InitializeComponent fires StackOverflow Exception when binding

  18. 18

    simple WPF data binding results in StackOverFlow exception

  19. 19

    Protobuf-net StackOverflow exception with Derived Types

  20. 20

    RaisePropertyChanged throwing a StackOverflow Exception on TwoWay Bound property

  21. 21

    Why does this property cause a StackOverFlow exception?

  22. 22

    Find a value in a binary tree avoiding stackoverflow exception

  23. 23

    JSF Backing Component - Composite Component - Stackoverflow Exception

  24. 24

    Stackoverflow exception when comparing two dynamic types

  25. 25

    StackOverflow exception in my F# code

  26. 26

    StackOverFlow-Exception after changing value of Property

  27. 27

    Eclipse Luna StackOverflow exception at Build Time

  28. 28

    InitializeComponent fires StackOverflow Exception when binding

  29. 29

    Why does this property cause a StackOverFlow exception?

HotTag

Archive