Publishing, Upgrading, and Installing Extensions During Upgrade
This article describes how to publish, upgrade and install extension when upgrading to a new version of Business Central.
Important
To complete the step in this article, you use the Business Central Administration Shell. You must run this as an administrator.
Get a list of current extensions
It is useful to get a list of the extensions that are currently published for future reference. To get list of the extensions currently published on the application, run the following command:
Get-NAVAppinfo -ServerInstance <ServerInstanceName>
Publish new system, test, and application symbols
If you installed the AL Development Environment, you can find the symbol files where your installed the environment, which by default is C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\NNN. Otherwise, you can find the files in the ModernDev folder on the installation media.
Unpublish the system, test, and application symbols.
To get a list of the currently published symbols, use the Get-NAVAppInfo cmdlet:
Get-NAVAppinfo -ServerInstance <ServerInstanceName> -SymbolsOnly
Unpublish the symbols using the Unpublish-NAVAPP cmdlet:
Unpublish-NAVApp -ServerInstance <ServerInstanceName> -Name <name> -Version <n.n.n.n>
Publish the new system.app and test.app symbol files.
To publish the symbols, open the Business Central Administration Shell as an administrator, and run the following command for each of the symbol files:
Publish-NAVApp -ServerInstance <ServerInstanceName> -Path <SymbolFilePath> -PackageType SymbolsOnly
Generate the application symbol references by using the finsql.exe file as follows:
Make sure that Enable loading application symbol references at server startup (EnableSymbolLoadingAtServerStartup) is set on the Business Central Server instance.
For more information, see Configuring Business Central Server.
Open a command prompt as an administrator, change to the directory where the
finsql.exe
file has been installed as part of Dynamics NAV Development Environment, and then run the following command:finsql.exe Command=generatesymbolreference, Database="<MyDatabaseName>", ServerName=<DatabaseServerName>\<DatabaseInstance>
Replace values for the
Database
andServerName
settings to suit.If the application database contains test objects (ID 130000-139999), then make sure to exclude these objects when generating symbols. You can do this by using the
-Filter
parameter and running the command twice:finsql.exe command=generatesymbolreference, ServerName=<DatabaseServerName>\<DatabaseInstance>, Database="<MyDatabaseName>", filter="Object ID=1..129999"
finsql.exe command=generatesymbolreference, ServerName=<DatabaseServerName>\<DatabaseInstance>, Database="<MyDatabaseName>", filter="Object ID=140000..1999999999"
Note
This command does not generate a file. It populates the Object Metadata table in the database.
When you run the command, the console returns to an empty command prompt, and does not display or provide any indication about the status of the run. However, the finsql.exe may still be running in the background. It can take several minutes for the run to complete, and the symbols will not be generated until such time. You can see whether the finsql.exe is still running by using Task Manager and looking on the Details tab for finsql.exe.
When the process ends, a file named navcommandresult.txt is saved to the Dynamics NAV Client connected to Business Central installation folder. If the command succeeded, the file will contain text like
[0] [06/12/17 14:36:17] The command completed successfully in '177' seconds.
If the command failed, another file named naverrorlog.txt will be generated. This file contains details about the error(s) that occurred.
For more information about generation symbols, see Running C/SIDE and AL Side-by-Side.
- Restart the Business Central Server instance.
Publish and synchronize new versions of extensions
You must upgrade the Microsoft extensions that were published in the old deployment to new versions. For Denmark (DK) and German (DE), you must also complete this step to install the new local functionality extensions, such as ELSTER.
The new extension versions are found in the \Extensions
folder of the installation media (DVD). Follow these steps for each extension by using the Business Central Administration Shell.
To publish the new extension version, run the Publish-NAVApp cmdlet:
Publish-NAVApp -ServerInstance <ServerInstanceName> -Path <ExtensionFileName>
Synchronize the database with the schema changes of the extensions
For each extension, run the Sync-NAVApp cmdlet:
Sync-NavApp -ServerInstance <ServerInstanceName> -Name <ExtensionFileName> -Version N.N.N.N -Tenant <TenantID>
Replace <TenantID>
with the tenant ID of the database. If you do not have a multitenant server instance, use default
or omit this parameter.
Upgrade the data of the extensions
This step is not required for the newly published local functionality extensions.
To run the data upgrade, run the Start-NAVAppDataUpgrade cmdlet:
Start-NAVAppDataUpgrade -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>
Apart from upgrading the data, this command will install the new extension version.
Install new extensions on the tenants
Install the newly published local functionality extensions by running the Install-NAVApp cmdlet:
Install-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>
For more information about publishing extensions, see Publish and Install an Extension.
Repair, synchronize, and install any custom extensions (third-party) that are currently published and that you still want to use
This ensures that the extensions work on the new platform and application versions. For each extension, complete the following steps from the Business Central Administration Shell:
Compile the extension to make it work with the new platform by running the Repair-NAVApp cmdlet:
Repair-NAVApp -ServerInstance <ServerInstanceName> -Name <Extension Name> -Version <N.N.N.N>
Synchronize the schema with the database:
Sync-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>
Install the extension:
Install-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>
See Also
Upgrading the Application Code
Upgrading to Business Central
Synchronizing the Tenant Database and Application Database
Publish and Install an Extension