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

Type:Guid
Position:Named
Default value:00000000-0000-0000-0000-000000000000
Required:False
Accept pipeline input:True
Accept wildcard characters: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":,"Minor":,"Build":,"Revision":}

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}}

Type:String
Position:24
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-ProgressAction

A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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
Aliases:AppPublisher
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

-Tenant

Specifies the tenant who has this application published.

Type:TenantId
Aliases:TenantId
Position:23
Default value:None
Required:False
Accept pipeline input:False
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
Aliases:AppVersion
Position:22
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

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