locked
How to add a dll to AOT-reference ? RRS feed

  • Question

  • Hi Dynamics AX Experts !

     I wrote a "hello word" dll file in VS2005. I want to add it to Dynamics AX, but when I do so, AX shows a error:

    "AOTadd(): Invalid name ."  

    Could any one tell me how to add a dll file in AOT-reference. 

    thank u ! 

    Monday, July 11, 2011 6:26 AM

Answers

  • Hi Dynamics AX Experts !

     I wrote a "hello word" dll file in VS2005. I want to add it to Dynamics AX, but when I do so, AX shows a error:

    "AOTadd(): Invalid name ."  

    Could any one tell me how to add a dll file in AOT-reference. 

    thank u ! 


    Hi,

    I am also in AX :-) here you go with step by step guide:

    1)Add the DLL to .NET directory for Microsoft Dynamics AX where a client is installed.
       (Path eg.-C:\Program Files\Microsoft Dynamics AX\50\Client\Bin)
    2)Add the DLL to the GAC(Global Assembly Cache) where an AOS is installed using following steps-
          -Open the command prompt
          -Navigate to the folder that contains the DLL.
          -Type the command "gacutil /i ClassLibrary.dll"
    Note:DLL assembly must be strong named (should Signed the Assembly from Project properties->Signing).

    After adding the DLL we can reference the same in Dynamics AX.
    AOT->References->Browse and add the DLL from its location.
    Now we are ready to use the .NET assembly functionality in Dynamics AX.

    If this solves your problem please Vote as Helpful and Mark as Answer.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Monday, July 11, 2011 9:38 AM

All replies

  • Sorry this forum can help/support CRM issues, try posting your query to the AX community (link below) which could be of definite help,

    https://community.dynamics.com/product/ax/f/33.aspx

     


    Cheers, Francis Edwin

    Follow me on: https://twitter.com/astutecrm

    My Blog: http://astutecrm.wordpress.com/ 

    Monday, July 11, 2011 7:33 AM
  • Hi Dynamics AX Experts !

     I wrote a "hello word" dll file in VS2005. I want to add it to Dynamics AX, but when I do so, AX shows a error:

    "AOTadd(): Invalid name ."  

    Could any one tell me how to add a dll file in AOT-reference. 

    thank u ! 


    Hi,

    I am also in AX :-) here you go with step by step guide:

    1)Add the DLL to .NET directory for Microsoft Dynamics AX where a client is installed.
       (Path eg.-C:\Program Files\Microsoft Dynamics AX\50\Client\Bin)
    2)Add the DLL to the GAC(Global Assembly Cache) where an AOS is installed using following steps-
          -Open the command prompt
          -Navigate to the folder that contains the DLL.
          -Type the command "gacutil /i ClassLibrary.dll"
    Note:DLL assembly must be strong named (should Signed the Assembly from Project properties->Signing).

    After adding the DLL we can reference the same in Dynamics AX.
    AOT->References->Browse and add the DLL from its location.
    Now we are ready to use the .NET assembly functionality in Dynamics AX.

    If this solves your problem please Vote as Helpful and Mark as Answer.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Monday, July 11, 2011 9:38 AM
  • thank you  Jehanzeb Javeed

    I did every steps you said at the first time.  but it still dosn't work .   it shows "AOTadd(): Invalid name ." 

    meybe it‘s my license's problem,    I'm in layer : USER.



    Thursday, July 14, 2011 3:56 AM
  • Hi,

    It is not the User layer issue, make sure that beside MorphX Development Suite you have the license installed for X++ development and also make sure that Business Connecter is installed on the system.

    You may also refer: http://msdn.microsoft.com/en-us/library/cc586538.aspx


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Thursday, July 14, 2011 2:22 PM
  • Please validate the name of the DLL file you are trying to add. The AOT has naming restrictions, so you should ensure the file name only contains a-z and 0-9.
    Wednesday, July 20, 2011 3:05 PM
  • After you have added a DLL to the GAC it should appear on the list of refs you can add, I don't think you should have to locate the file specificly by using the browse(at least if the code is server tier)
    Wednesday, May 30, 2012 9:49 PM