Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Automatic build using ...
Finance forum
Answered

Automatic build using Microsoft-hosted agents and Azure Pipelines

Posted on by 170

Hello !

I want to create a Azure Pipeline for D365FO automatic build using Microsoft-hosted agents  and I'm confused about "Build solution" step.

I understand that in order to build a deployable package for the models in TFS, we need to provide a Visual Studio solution that can contain one or multiple *rnrproj projects.

Those projects must contain all the code for a model? Do I need to create *rnrproj project and drag in all the related model objects from AOT? This means that every time a developer add a new class, I need to update this project? If this it's an empty project, it must have a specific naming conversion? I don't understand how the process works.

I have in the TFS the main branch containing one or more models. What if I have to create a package only for one model ? How does the pipeline knows to build a package for a specific model since it has the reference to the whole main branch, which contain multiple models.

This is what i have:

Main/Dev branch and a specific Build folder which contains the empty project/soution:

pastedimage1611567913549v2.png

I don't know what files(objects) I need to put into this project or  how to properly create them in order to build the code for one model in the main branch.

pastedimage1611568104619v3.png

This is the rest of the Pipeline:

pastedimage1611568320592v4.png

pastedimage1611568402613v5.png

pastedimage1611568503022v6.png

Thank you.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Automatic build using Microsoft-hosted agents and Azure Pipelines

    Hi,

    I think that question was already answered: it will build the whole model.

  • FlorinF Profile Picture
    FlorinF 170 on at
    RE: Automatic build using Microsoft-hosted agents and Azure Pipelines

    Thank you Nikolaos

    So, If the project is empty, the PipeLine it will build a package for the model associated with the project:

    pastedimage1611571934214v1.png

    Theoretically I can add objects from AOT to this project, like forms, classes etc. This means that the PipeLine will build a package that will only contain objects from the project or will build a package for the  model RO regardless of what the project contains ?

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Automatic build using Microsoft-hosted agents and Azure Pipelines

    Each project has a property that tells which model it's related. For example your project in your screenshot is associated with "RO" model.

    So, if you only want to build RO model, then your solution looks ok.

    Normally you should anyway always build and deploy all your code.

  • FlorinF Profile Picture
    FlorinF 170 on at
    RE: Automatic build using Microsoft-hosted agents and Azure Pipelines

    Hi Sergei,

    But how can I associate a project in the solution with a model that I want to build ? Is the project name important ?

    For example, I have in the main branch to models RO1 and RO2.

    pastedimage1611570866451v1.png

    But I want to create a build only for  model RO1. How the solution and project must be created? :Now I have something like this:

    pastedimage1611571016694v2.png

    How the pipeLine knows which source files from the main branch will uses to build a package only for model RO1

    Thank you for your time.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Automatic build using Microsoft-hosted agents and Azure Pipelines

    Your solution should contain one (empty) project for each model that you want to include in your build.

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,083 on at
    RE: Automatic build using Microsoft-hosted agents and Azure Pipelines

    Hi FlorinF,

    You don't need to include any objects in the VS projects for the build pipeline. The build solution should contain projects associated with models you want to build and they can be empty, but just be sure that the solution contains all project = models you want to build.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans