web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Cannot Build Project due to missing reference

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    299,407 Super User 2025 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.

  • Michael Morin Profile Picture
    on at
    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.

  • Sangram Shinde Profile Picture
    2,110 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!

  • Community Member Profile Picture
    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.

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

    Hi Andre,

    Its also working for me.

    Regards

    Arun

  • AamirHanif Profile Picture
    71 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
    Dhruv R Thakar Profile Picture
    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans