1
votes

As I try to build this project, I keep coming up with an error.

Description, where the eight '*' are always something different with every build:

An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'myTypeName' found in assembly 'App_Web_********'.

and the file is

aspnet_merge

What do I need to do in order to resolve this (annoying) error?

1
Does it actually say Duplicate type '<>' verbatim, or is there a type-name inside the angle-brackets? - Dai
There is a type-name inside. I will edit that for clarity - user94614
I'm guessing your WebForms project is referencing another WebForms project or otherwise references another project in the same solution or has code in App_code that is messing it up. Does the website build fine without using the merge step? - Dai

1 Answers

1
votes

A couple of things you can try is after right clicking on your project, select Publish Web App. Then under settings (settings for me, might be different for you), find your File Publish Options and click Configure. You'll see the dialog below.

Try the first or second option, Do not merge OR Do not merge. Create a separate assembly for each page and control

enter image description here

I know this is something that has plagued me in the past so good luck. Update us if you find any better or if something better works for you.