ILMerge strange behaviour

℡╲_俬逩灬. 提交于 2019-12-23 03:34:13

问题


I have an issue using the latest version of ILMerge and I would like if someone can explain me if this is normal. During my search on the web I realized I was not using the latest version of ILMerge so I updated my projects and this is where everything got wrong… First let me explain quickly my project dependencies:

  • The dll project A references and uses ILMerge.
  • The dll project B references and uses the dll A but it do not reference ILMerge.
  • The application project C reference the dll B but it do not reference A nor ILMerge.

My issue is : with the latest version of ILMerge the file is not copied in the output bin folder when the projects B or C are compiled.

With the ILMerge version 2.11.502.0:

  • When I build the dll project A the bin folder contains A.dll and ILMerge.exe.
  • When I build the dll project B the bin folder contains B.dll, A.dll and ILMerge.exe.
  • When I build the dll project C the bin folder contains C.dll, B.dll, A.dll and ILMerge.exe.

However, with the ILMerge version 2.14.1208:

  • When I build the dll project A the bin folder contains A.dll and ILMerge.exe.
  • When I build the dll project B the bin folder contains B.dll and A.dll.
  • When I build the dll project C the bin folder contains C.dll, B.dll and A.dll.

When I made the move to use the latest version of ILMerge I updated the reference in my project A and make sure to set the property Copy Local to true. When I revert back to the older version it works as expected and the file is copied everywhere.

I am using Visual Studio 2012. I have been told by Mike Barnett from Microsoft that this weird behavior exists also with VS2013 but not with VS2015.

Did someone ever encounter a similar issue?

Here is an example: ILMergeIssue.zip

来源:https://stackoverflow.com/questions/38443002/ilmerge-strange-behaviour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!