Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Packaging Solution with the command prompt

(0) ShareShare
ReportReport
Posted on by

I have been using Visual Studio in order to create the deployment package of my solution. I open Visual Studio then select Dynamics 365 > Deploy > Create Deploy Package. Afterwards I select the Application Suite and select where to place the deployment package. Clicking create then creates the package for me. (This is the standard way to do this).

I was wondering if there was a way to execute this process through the command line? Or is there a way to get the final deploy package through the command line?

Ultimately I want to automate this process in an ant script.

*This post is locked for comments

  • Martin Dráb Profile Picture
    233,350 Most Valuable Professional on at
    RE: Packaging Solution with the command prompt

    No, you can't use git. You have to use Team Foundation Version Control (TFVC). There you'll store both your models and your projects (projects merely link to files stored in the packages folder).

    The build component of VSTS can execute a build automatically on a build environment (which you must deploy first) and it creates a deployable package. The default template stores the result on VSTS servers; if you want to put it to FTP, you'll have to modify the template.

    Regarding your process, first drop your project and create a new one with TFVC instead of git. Then create the right folder structure: create \Trunk\Main folders and inside Metadata and Projects. Commit these changes to version control and then map  Projects to the folder where you want to store VS projects and Metadata to the folder where you have AX packages (e.g.  J:/AosService/PackagesLocalDirectory).

    Ask if you get stuck.

    Nevertheless it will be better if you first read some introduction to VSTS and return to these after that. VSTS has very good documentation, and Dynamics 365 for Operations also have some.

    If you decide to use Jenkins, you'll have to set up the whole build process from scratch by yourself. If you follow the recommended process, the template for VSTS build is already prepared (and supported) by Microsoft.

  • Community Member Profile Picture
    on at
    RE: Packaging Solution with the command prompt

    I am unfamiliar with VSTS. I have looking into it for a bit and have a few questions regarding how it works. First I will provide my understanding of how the process works, please correct me if I am wrong:

    VSTS is going to be linked to a git repository where our solution sits (our .sln file). It is going to use the solution and generate the deploy package (similar to the one done by going to Visual Studio then select Dynamics 365 > Deploy > Create Deploy Package). Afterwards, VSTS has functionality to take that deploy package and put it on an FTP site.

    I created an account for VSTS and created a new project. I created a git repo for it as well which is currently empty. When I try to add my solution to the project by right clicking the solution and selecting "add solution to source control..." I get prompted with a message "The current solution has projects that are located outside the solution folder. These projects will not be source controlled in the Git repository. To add all the projects to a single Git repository please consolidate all projects under a single folder."

    Is this because my solution is part of the application suite, as opposed to not being connected to default AX models? If so will it still work if I add just my solution?

    Am I on the right track?

    Has anyone created a solution that is associated with a model in AX (application suite, fleet management etc) that they have deployed? Do you have any steps that can help me through this process?

    We typically use Jenkins to build, I looked into VSTS and it does integrate with Jenkins

    Any help is much appreciated.

  • Suggested answer
    Martin Dráb Profile Picture
    233,350 Most Valuable Professional on at
    RE: Packaging Solution with the command prompt

    You're not doing it right. You should be building the code stored in your version control system, not the code that happens to lie on your disk. You risk delivering code that was never added to version control, you can't track what you actually delivered, you may deliver changes that were never intended for production and so on.

    The right process is deploying a build machine and let the VSTS build process do the work for you. These builds are fully automated, so it's exactly what you need, and they do more than just creating a package (they compile the application and report errors, can run automated tests, you can easily build another branch in version control and so on).

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans