Repair-NAVApp

Repairs a Business Central app by recompiling it against the current base application. Use this cmdlet if the base application has changed since publishing the Business Central app. It is recommended that the Business Central Server instance is restarted after running the repair.

Syntax

Repair-NAVApp
      [-ServerInstance] <String>
      [-Name] <String>
      [[-Publisher] <String>]
      [[-Version] <Version>]
      [<CommonParameters>]

Description

Use the Repair-NAVApp cmdlet to recompile a Business Central app that has been published in the app catalog of the specified Business Central Server instance.

If you have deployed your Business Central database to Azure SQL Database, you will need to create a new database to use as the sandbox for completing the publishing process. Use the SandboxDatabaseName, SandboxDatabaseServer, and SandboxDatabaseCredentials parameters to specify the connection information for the database to use as the sandbox.

Important

You can't use this cmdlet on apps that are published as runtime packages, unless the package includes the source code. For more information, see Creating Runtime Packages for Business Central On-Premises.

Examples

EXAMPLE 1

Repair-NAVApp -ServerInstance BC -Name 'Proseware SmartApp' -Version 2.3.4.500

This example repairs the Business Central app with a name of Proseware SmartApp and version of 2.3.4.500.

EXAMPLE 2

Get-NAVAppInfo -ServerInstance BC| Repair-NAVApp

This example repairs all of the Business Central apps in the Business Central server instance's app catalog.

Parameters

-Name

Specifies the name of the Business Central app to be repaired.

The search must return only a single Business Central app to successfully repair.

Type:String
Position:20
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Publisher

Specifies the publisher of the Business Central app to be repaired.

The results must return only a single Business Central app to successfully repair.

Type:String
Position:21
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ServerInstance

Specifies the Business Central Server instance for which the Business Central app should be repaired, such as BC.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Version

Specifies the version of the Business Central app to be repaired.

The results must return only a single Business Central app to successfully repair.

Type:Version
Position:22
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False