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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Microsoft-hosted agents "failed to load due to the module X not being present"

(0) ShareShare
ReportReport
Posted on by 25

Hi all,

First time trying to create a MS-hosted pipeline. Want to ask few questions and also recap some version control concepts that I thought was something well established. When executing the pipeline, I'm getting the following error:

The assembly 'Dynamics.AX.MODELNAME, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' failed to load due to the module 'Dynamics.AX.MODELNAME.Queries.0.netmodule' not being present. Please perform a full build of the module that produced this dll.

Some tests that I already did:

  • I was getting this same error message while compiling other model. As a test, I added all binary file (from MODEL/BIN folder) to source control and removed that particular model from AxBuild.sln solution. I'm a bit confused since at this point I never needed to add the binary files to source control.
  • I installed the DevOps in one DEV vm and use it as the agent pool. I can see the pipeline is building the models and I can see the Dynamics.AX.MODELNAME.Queries.0.netmodule file after the pipeline is done (with errors).

This is my current pipeline setup:

Screenshot-from-2021_2D00_02_2D00_04-09_2D00_19_2D00_00.pngScreenshot-from-2021_2D00_02_2D00_04-09_2D00_21_2D00_14.pngScreenshot-from-2021_2D00_02_2D00_04-09_2D00_21_2D00_27.pngScreenshot-from-2021_2D00_02_2D00_04-09_2D00_20_2D00_22.png

What am I missing? Is there any setup I'm doing wrong?

Thanks in advance for your time reading this.

LOGS:

[View:/cfs-file/__key/communityserver-discussions-components-files/765/build.log:320:240]

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Anderson,

    Could you, please, explain a bit your model structure? ModelName in your case is it a custom model or standard model? Did you use build VM before?

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Anderson,

    Could you, please, explain a bit your model structure? ModelName in your case is it a custom model or standard model? Did you use build VM before?

  • Anderson Joyle Profile Picture
    25 on at

    Thanks for your reply, Sergei.

    The error happens when the build routines tries to build CUSTOMMODEL1 that has a dependency to CUSTOMMODEL2.

    CUSTOMMODEL2 compiles just fine.

    Yes, I did use build VM prior.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Anderson,

    So, if you check the build log, CustomModel2 is compiled before CustomModel1? There were issues with proper build sequence and some models could be compiled before references were compiled. It was fixed in a recent build (10.0.15 or 10.0.16)

  • Anderson Joyle Profile Picture
    25 on at

    I see.

    Just to make sure we are at the same page, let me use other terms:

    I have CustomModel and CustomModelExtensions.

    CustomModelExtensions depends on CustomModel.

    From the logs, I can see CustomModel is built first, then CustomModelExtensions is build (from which I get the error about CustomModel netmodule file is missing).

    Does this still falls into the problem you mentioned?

    Will adding all CustomModel binary files to version control help?

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Anderson,

    You need to add only source code files and description files to the source control if you are the owner of these models Would you mind sharing the build log?

  • Anderson Joyle Profile Picture
    25 on at

    I uploaded a version of MsBuild step logs to the article. Hope this will some clarification.

    I had to removed the majority of the information (such as warnings and "copy file from/to lines) and kept only what is related to the two custom models (CustomModel and CustomModelExtensions).

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Anderson,

    Don't you lose the reference in CustomModelExtensions description to CustomModel model in source control?

    Do you have another dev VM where you can pull the code from source control and build it manually?

  • Anderson Joyle Profile Picture
    25 on at

    There are 2 dev environments and both build just fine.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Anderson,

    I'm running out of ideas. Maybe you should review what is stored in the source control. Do you have only descriptor, source code (folder with the same name as model name), and bin folder if you use external dlls (no dlls generated by build in dev vm were added)?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans