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>
    [-AppId <Guid>]
    [[-Name] <String>]
    [[-Publisher] <String>]
    [[-Version] <Version>]
    [[-Tenant] <TenantId>]
    [[-DependencyDescription] <String>]
    [<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.

Don't use the cmdlet to upgrade a runtime package app to newer Business Central version.

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

-AppId

Specifies the ID of the Business Central App to be repaired.

Parameter properties

Type:Guid
Default value:00000000-0000-0000-0000-000000000000
Supports wildcards:False
DontShow:False

Parameter sets

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

-DependencyDescription

DO NOT USE: This parameter is intended for Microsoft use only.

Specifies the version of each dependency of the repairing app to be used when compiling. If the parameter is used, the value must include information about every dependency, and every dependency must already be published. If not, the repairing operation will fail.

The value is stringified dictionary of the type GUID that has the format: {"<app ID 1>":{"Major":<n>,"Minor":<n>,"Build":<n>,"Revision":<n>}

Example: {"a64e94c6-2aa3-490a-9e3a-23dd047dcb72":{"Major":1,"Minor":0,"Build":0,"Revision":0}, "4dcc7853-f43a-462b-a69e-a9931341d90d": {"Major":1,"Minor":0,"Build":1,"Revision":23}}

Parameter properties

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

Parameter sets

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

-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
Aliases:AppName

Parameter sets

(All)
Position:20
Mandatory:False
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
Aliases:AppPublisher

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

-Tenant

Specifies the tenant who has this application published.

Parameter properties

Type:TenantId
Default value:None
Supports wildcards:False
DontShow:False
Aliases:TenantId

Parameter sets

(All)
Position:23
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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
Aliases:AppVersion

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.

Inputs

System.String

By value and by property name: ServerInstance

System.String

By property name: Name

System.String

By property name: Publisher

System.Version

By property name: Version