MSBuild.ILMerge.Task not allowing Duplicate Types

喜你入骨 提交于 2020-01-07 04:24:47

问题


I'm getting the following error from a call to ILMerge.

ILMerge.Merge: ERROR!!: Duplicate type 'System.Net.Http.HttpRequestMessageExtensions' found in assembly 'System.Net.Http.Formatting'. Do you want to use the /alllowDup option?

And you'd think this would be straightforward to solve. The error message says what to do.

But my call to ILMerge is made by MSBuild.ILMerge.Task

And it seems I'm already doing what I need to do to get this to happen...

From my ILMerge.props file:

<!-- added in Version 1.0.4, default=none -->
<ILMergeAllowDuplicateType>true</ILMergeAllowDuplicateType>

` I'm getting warnings about validation of this properties file, but nothing else that would prevent the build. So what does it take to convey this to ILMerge?


回答1:


Per: https://ilmergemsbuild.codeplex.com/workitem/11

Seems the correct value is

<ILMergeAllowDuplicateType>*</ILMergeAllowDuplicateType>


来源:https://stackoverflow.com/questions/44044499/msbuild-ilmerge-task-not-allowing-duplicate-types

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