ILMerge generated assembly doesn't run, although log output reports no errors - why is this?

前端 未结 5 1110
一向
一向 2021-02-03 11:41

I\'m testing out ILMerge for a new project, and although the .exe file seems to be created correctly, it won\'t run.

I have installed ILMerge via the .msi installer (fou

5条回答
  •  青春惊慌失措
    2021-02-03 12:14

    Perhaps this will not solve your problem, but I think that it is good to verify, that your ilmerged executable doesn't contain references to merged libraries. You can check this with ILSpy (http://wiki.sharpdevelop.net/ILSpy.ashx) - just disassemble your ilmerged executable and check in the tree what assemblies are in references. ILSpy can also help you to verify that your ilmerged executable contains classes from merged assemblies.

    Next option could be also to debug assembly bindings when trying to start your ilmerged application (http://msdn.microsoft.com/en-us/library/e74a18c4%28v=VS.100%29.aspx).

    You could also try to debug ilmerged assembly to find out if application crashes even before calling main function, or perhaps somewhere inside.

    I think that identifying particular type which cannot be found could help to fix the problem.

提交回复
热议问题