Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

App Scope and version update

Posted on by 2,983

Have 2 questions about publishing apps to a Business Central 17 OnPrem installation

I've noticed, that when I'm working with VS Code, and hit F6, the app is publish with Scope: Tenant, and Tenant deffault

But, when I use the powershell command "Publish-NAVApp -ServerInstance bc170..." the Scope is Global, with no tenant

Is it possible to publish to scope: Global from VS Code?

And the next question is, for example I have an app in version 1.0.0.20 published in BC170. When I want to publish the next version, 1.0.0.21, do I have to manually uninstall the previous version, or is there a command to automatically uninstall the old version and publish the new one? Can this update be done from VS Code?

Thanks.

Categories:
  • RE: App Scope and version update

    Hi Ghetz,

    I use a serie of powershell-scripts wrapped in a Azure Devops Extension and we release our apps from there.

    Our install task has logic to install, upgrade and remove older version from the "gloabal" scope. There's also commercial products with same capabilities if you're not into powershell.

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: App Scope and version update

    Thanks for your answer, could you point me to the powershell cmdlet to update the app? Currently I use these commands:

    Uninstall-NAVApp -ServerInstance bc170 -Name MyApp -Version 1.0.0.52
    Publish-NAVApp -ServerInstance bc170 -Path 'C:\Temp\MyApp_1.0.0.53.app' -SkipVerification
    Sync-NAVApp -ServerInstance bc170 -Name MyApp -Version 1.0.0.53
    Start-NAVAppDataUpgrade -ServerInstance bc170 -Name MyApp -Version 1.0.0.53
    Unpublish-NAVApp -ServerInstance bc170 -Name MyApp -Version 1.0.0.52
    Install-NAVApp -ServerInstance bc170 -Name MyApp -Version 1.0.0.53

    I would prefer to always publish with a global scope; as we don't use tenant funcionality. So I guess VS Code F5 is not an option.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,160 on at
    RE: App Scope and version update

    1) No.

    2) You can use POwershell cmdlets (and the app is updated automatically) or you can directly update from VS Code (hitting F5 updates the app).

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans