Tuesday, March 31, 2015

Duplicate type with name ‘Dynamics.Ax.application.*’ in assembly ‘Dynamics.Ax.application.* (2012 R2)

You may get an error while doing a CIL that says Duplicate type with name ‘Dynamics.Ax.application.*’ in assembly ‘Dynamics.Ax.application.* Which may be a result of you deleting an object and then reimporting it.

A result of this issue is many things within AX may stop working and if you go into

<Company>/System administration/Setup/Services and Application Integration Framework/Inbound Ports you will see many of the services have stopped and can not be restarted thus causing issues within the AX instance.

In order to fix this issue you will need to do the following(steps are listed as if you have a cluster of AOS instances)

  1. Stop all AOS instances
  2. Delete all files on the AOS server under C:\Program Files\Microsoft Dynamics AX\60\Server\<aos instance name>\bin\XppIL
  3. Connect to the model db via SQL Management studio
  4. Truncate the table SYSXPPASSEMBLY which lists all of the files found in step 2
    1. You can do this via the command: TRUNCATE TABLE SYSXPPASSEMBLY
  5. Start 1 AOS instance
  6. Run Full CIL
  7. Start remaining AOS instances


You should now look at the inbound ports to make sure everything now starts correctly. If this does not work you will need to run a full compile of the AOS and repeat the steps listed above.

4 comments:


  1. Hi Adam,
    I am having the same issue.. i just need to know whether i must delete the offending object (Custom Table) from the AOT before performing all the above mentioned steps or do i just performs the steps directly.
    Thanks

    ReplyDelete
  2. Muhammand, you do not need to delete any customer tables. Just make sure all aos instances tied to the enviornment are turned off. Run the truncate statement on the model db. Delete the files from every aos folder listed in step 2. Start up one of the aos servers and run a full cil. Your issues should be resolved then you can turn back on any remaining aos servers

    ReplyDelete
  3. Hi,

    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.

    ReplyDelete