1

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?

3
  • Does it actually say Duplicate type '<>' verbatim, or is there a type-name inside the angle-brackets? Commented Jan 31, 2018 at 20:50
  • There is a type-name inside. I will edit that for clarity Commented Jan 31, 2018 at 20:51
  • 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? Commented Jan 31, 2018 at 20:52

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.