Share via


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

Default (Default)

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:20
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:21
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ServerInstance

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:Version
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:22
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.