ILMerge.Merge: ERROR!!: Duplicate type

Wally96333 71 Reputation points
2023-10-14T19:40:25.43+00:00

What I am trying to do is very straightforward (or it should be).

I am trying to merge all of my DLLs and associated resources into a single executable with Visual Studio 2017 Community using ILMerge. I get the following error:

Error ILMerge.Merge: ERROR!!: Duplicate type 'XamlGeneratedNamespace.GeneratedInternalTypeHelper' found in assembly 'xxxx.WPF'. Do you want to use the /allowDup option? Primary_Calc_Console_01

I see that an ILMerge.props file has been introduced after the installation. Presumably, this is a config file for ILMerge (?).

I see the following tag in the config file: <!-- added in Version 1.0.4, default=none --> <ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>

I cannot find anything in the way of a schema for that file.

Can someone tell me what value I should give it to allow duplicate types?

THANKS!

Developer technologies | Windows Presentation Foundation
Developer technologies | .NET | Other
{count} vote

1 answer

Sort by: Most helpful
  1. Wally96333 71 Reputation points
    2023-10-18T00:06:18.4433333+00:00

    Apparently, ILMerge does not work with WPF.

    I have tried another method, and have a problem with that.

    I will start a new question on that issue ...

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.