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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Build Automation Custom Model Reference Error

(0) ShareShare
ReportReport
Posted on by 1,214

Hi,

This is continuation from my effort here https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/401765/build-automation-add-nuget-package-to-azure-artifacts-feed where I'm trying to configure build automation.

After successfully adding nuget packages to azure devops feed, I imported the sample pipeline from https://github.com/microsoft/Dynamics365-Xpp-Samples-Tools/tree/master/CI-CD/Pipeline-Samples to my project.

Now I'm running the build for the first time. I have custom models with below naming conventions:

  • TDD9
  • TDD10
  • TDD11
  • TDD12

These models have dependencies like following:

  • TDD10 refers to TDD9.
  • TDD11 refers to TDD9 & TDD10.
  • TDD12 refers to TDD9, TDD10 & TDD11.

In DevOps repos, naturally they are sorted by name alphabetically like this:

  • TDD10
  • TDD11
  • TDD12
  • TDD9

So when running the pipeline, looks like it builds TDD10 first and since TDD10 have reference to TDD9 & TDD9 haven't been built yet, the build throws error

"No assembly matching referenced module 'TDD9' is found".

How can we handle this situation? Can we sort which models to build first?

There has to be a way where it automatically detects all model dependencies and run the build accordingly I assume?

Thank you.

I have the same question (0)
  • nmaenpaa Profile Picture
    101,172 Moderator on at

    The alphabetical order of the model/package names should not impact the order in which they are built by the build process.

    Have you managed to build your codebase succesfully with a normal build server (using a build pipeline)?

  • HAIRUL HAZRI Profile Picture
    1,214 on at

    Hi Nikolaos,

    do you mean this part?

    basic-build-pipeline.PNG

    Aren't they the same build task?

  • nmaenpaa Profile Picture
    101,172 Moderator on at

    No I meant the traditional pipeline with a build server. It's created automatically if you deploy a build VM from LCS.

  • HAIRUL HAZRI Profile Picture
    1,214 on at

    We don't have any build VM. All this while we only create package from DEV environment. We didn't even use source control.

    Because of the All-in-one deployable package enforcement, this is our first time working with source control and azure pipeline.

    Anyway, where should I look to resolve this?

  • Verified answer
    Joris dG Profile Picture
    17,782 on at

    You should create a solution that has a project for each of your modules. If you're on PU36 or above that should result in the compile ordering automatically. If you have each module in its own solution, Visual Studio msbuild has no way of figuring out orders. It's the same concept you would see with C#.

    That said - having a separate model for each requirement is absolutely a bad idea. You should minimize the amount of models/modules you have, otherwise it will become a code maintenance and customization discovery nightmare.

  • HAIRUL HAZRI Profile Picture
    1,214 on at

    Hi Joris,

    So in DEV environment, I created a new solution and added all existing projects inside.

    Then I check-in the solution.

    Since I checked-in all those solutions for each model, in Visual Studio build task in pipeline, I made sure to build only the newly created solution that contains all projects & models.

    This helped me to get past the build error.

    Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 370

#3
Martin Dráb Profile Picture

Martin Dráb 283 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/blogs/post/?postid=%27nvOpzp;%20AND%201=1%20OR%20(%3C%27%22%3EiKO))," - Too many )'s.