Duplicate type with name 'Dynamics.Ax.Application."TableName"' in assembly in AX 2012

Hello All,

I have created 2 customize table(Header,Line).by using that i have created one AIF Web service(Inbound and Outbound).

Due to some reason i deleted Line table and immediately again I import that table.

But Due to that i facing error during CIL Generation.

"Duplicate type with name ‘Dynamics.Ax.Application.“TableName(Line)”’ in assembly 'Dynamics.Ax.Application,

Version=, Culture=neutral, PublicKeyToken=null’."

And my All AIF services are not working.

To Solve this issue,

I did


2**.Delete content Of XPPIL directory.**

3.Full CIL Generation.

But Still i am facing same error during Full CIL Generation,

Please Help me to solve this issue,



I would be interested in debugging that, to see how such a problem may occur.

Anyway, what if you delete the table, generate Full CIL and add the table again?


When i deleted and again import that table.and then when i am trying to generate CIL ,facing following error.

Duplicate type with name ‘Dynamics.Ax.Application.“TableName”’ in assembly in AX 2012



Did you generate full CIL after removing the table from AX? if there is no definition with that name in X++, then nothing should go to CIL either.

Also, try to compile your X++ code before building CIL.

Hi Martin,

Thanks for your reply.

My error Solved.I truncate on table from SQL database regarding Assembly.

Then generate full CIL.




I tried the above steps , but still AIF service stopped automatically. Below is the event log error:

There was an error during processing of the managed application service auto-start for configuration path: ‘MACHINE/WEBROOT/APPHOST/Default Web Site/MicrosoftDynamicsAXAif60’. The error message returned is: 'An initialization error occurred while trying to preload an application.

Exception: System.Configuration.ConfigurationErrorsException

Message: Duplicate type with name ‘Dynamics.Ax.Application.MZK_InvestmentPayoutContract’ in assembly ‘Dynamics.Ax.Application, Version=6.2.1000.1437, Culture=neutral, PublicKeyToken=null’.

Where i can this check this duplicate ?

After re-installing Web service thorugh AX Setup it works, but if i create new or deactivate and activate existing services(inbound ports), again AIF service gets stopped and above is the event log.