Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Cannot Build Project due to missing reference

Posted on by

Hi,

  I am a beginner to development in AX 7. So I apologize if this is something I should know. I wanted to create an entity to extract some data from AX 7. I created a solution and project and then added an entity using the Wizard. I wanted to start simple so I added the InvenTable and EcoResProduct. 

  When I build the project I get the following error:

Error A reference to 'Dynamics.AX.Ledger, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is required to compile this module. 

Now I did some digging and see that I could import some of the references under C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions. Most of the references referred to in the warnings are there, however the Dynamics.AX.Ledger, from the error, is not. 

Did i miss installing some library? 

 

Thanks in Advance


Michael Morin

*This post is locked for comments

  • Suggested answer
    Dhruv R Thakar Profile Picture
    Dhruv R Thakar 214 on at
    RE: Cannot Build Project due to missing reference

    You can check this link

    dhruvrthakar.blogspot.com/.../how-to-fix-error-reference-is-required.html

    If the post is helpful in that it provides the solution, please mark as Verified to help other members.

  • AamirHanif Profile Picture
    AamirHanif 67 on at
    RE: Cannot Build Project due to missing reference

    Hi Gopal,

    You need to update your model parameters and add a reference to ' ContactPerson ' package.

  • Suggested answer
    ArunGarg Profile Picture
    ArunGarg 3,924 on at
    RE: Cannot Build Project due to missing reference

    Hi Andre,

    Its also working for me.

    Regards

    Arun

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot Build Project due to missing reference

    Hi all,

    while working on Dynamics 365 - O report i come up with same error.

    I encounter this error while build gets completed (Project consist of SSRS report object).

    error "A reference to 'Dynamics.AX.ContactPerson, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is required to compile this module".

    I have run and competed Build and DB-Sync in VS.

  • Reliable Profile Picture
    Reliable 2,015 on at
    RE: Cannot Build Project due to missing reference

    Hi Andre,

    I faced exactly same error while i was creating a custom entity to export released products along with some additional fields from products. Your suggestion helped me here, in my case a 'Currency' package was missing. I have referred that and error went out. Thanks!

  • RE: Cannot Build Project due to missing reference

    That was exactly it. Under the model references there was a Ledger option. I checked it and everything builds.

    Thank for you help.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,232 Super User 2024 Season 2 on at
    RE: Cannot Build Project due to missing reference

    Hi Michael,

    You need to check how you created your model. In this case you would need to have an extension model and add more referenced models. I guess a ledger model should be referenced.

    Using the Dynamic AX menu in VS you can update the model properties to add models as reference.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,232 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans