Tuesday, 12 April 2016

Consuming External DLL from NEW Dynamics AX (AX7)

Hello there,

Whats the big difference between AX 2012 and AX7 on consuming external DLLs.  We do add the DLLs as the references at the Reference folder and copy the DLLs over to a specified folder and just use it.  Yes, it works for both the versions, but the difference comes here on building the external DLLs and the path to copy the DLLs.

If you have used ManagedInterop DLL to consume AX 2012 business logic from within the DLL, then that model would not work with AX7.  See my another blog that explains on consuming AX7 Business logic from outside AX here.  You will need to change the approach that fits AX7.  And, the Project assembly should NOT be signed.  You will likely to get run-time errors if it is signed.  See here for more details.

Also, you will need to choose the .NET Framework Version as 4.5 at the Project properties.  I've tried using the below and above versions, but was not working.

Then comes the folder path to copy the DLLs over for the application to consume.  The DLLs need to be copied over to the following folders:

  • C:\Packages\ApplicationSuite\bin
  • C:\CustomerServiceUnit\DOBind\Packages\Cloud\AosWebApplication\AosWebApplication.csx\roles\AosWeb\approot\bin

We've upgraded our solution to AX7 and the model is residing under the ApplicationSuite folder and hence, the respective DLLs need to go under ApplicationSuite\Bin folder.  You can also copy over the PDB files over there if you want to debug.  This is the case with AX7 Local VM, cloud hosted ones is the different story.

Note:  This is the case with AX7 RTW (7.0.1265.3015).

Cheers!

No comments:

Post a Comment