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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

How to build extension code using script?

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I have made a Dynamics 365 Business Central extension and I can only build and publish the my extension in Visual Studio Code by press "F5". How could I build the code using Script like using "MSBuild". I try to use "Get-NAVAppManifest", but it said the manifest has to be xml format. Is that means I have create another Manifest file instead of using app,json?

Another question is when I upload an .app file, one version could only be uploaded once? If the same package with same version and ID upload again with unpublishing and uninstalling previous package. It still throw an error said the package has upload before? Is that means I have to add the version number up again and again every time I made a change?

Thanks in advance.

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    1) If you're talking about D365BC, in a production environment you can publish an extension by directly loading the .app file. It cannot be done automatically.

    In a sandbox environment, you can use an automatic publishinng from VSCODE (F5) or a semi-automatic way by using Publish-NavContainerApp, but this last case works ONLY if you're using a local docker container (not online sandbox).

    2) If from a first publishing of app A you publish a new version with same id without data loss, this works. 

  • Community Member Profile Picture
    on at

    I'm so glad you replay me. I just want to know that could I write a script to generate the .app file in D365BC? I know we could upload .app file in production environment or build and publish in VS Code for sandbox environment. I just want to know how to build and create .app file use script? Thank you~

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    You can create a build task in VSCODE to automate the process. Details here:

    navbitsbytes.wordpress.com/.../al-extensions-build-without-deploying-using-visual-studio-code-tasks

  • Community Member Profile Picture
    on at

    Thank you so much. That perfectly solve my issue!

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans