MSBuild.ILMerge.Task不允许重复的类型 [英] MSBuild.ILMerge.Task not allowing Duplicate Types

查看:413
本文介绍了MSBuild.ILMerge.Task不允许重复的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从对ILMerge的调用中出现以下错误.

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

ILMerge.Merge:错误!::复制类型 程序集中找到"System.Net.Http.HttpRequestMessageExtensions" 'System.Net.Http.Formatting'.您是否要使用/alllowDup 选项吗?

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.

但是我对ILMerge的呼叫是由MSBuild.ILMerge.Task

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...

从我的ILMerge.props文件中:

From my ILMerge.props file:

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

` 我收到有关此属性文件验证的警告,但没有其他会阻止构建的警告.那么,如何将其传达给ILMerge?

` 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?

推荐答案

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

似乎正确的值是

<ILMergeAllowDuplicateType>*</ILMergeAllowDuplicateType>

这篇关于MSBuild.ILMerge.Task不允许重复的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆