Can't publish to Business Central
We recently switched from developing on a local Nav18 server to developing on Business Central.
When I try to publish the app to the sandbox I get the following error:
[2018-09-05 12:49:59.05] The request for path /v1.0/sandbox/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension.
The error also shows up after resetting the sandbox.
- AL Extension Version: 0.16.19969
- Server Version: DE Dynamics NAV 12.3 (23918)
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "Microsoft cloud sandbox",
"startupObjectId": 22,
"startupObjectType": "Page"
}
]
}
Unpublish your app from Business central search for "Extensions", and unpublish your app.
Publish your app again.
The app is not listed in the extension menu.
Increase the version in the app.json file
Increasing the Z value of the version by one resulted in the following error:
[2018-09-05 15:12:44.66] The request for path /v1.0/sandbox/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason:
Mehrere veröffentlichte Erweiterungen passen zu den angegebenen Parameterwerten. Sie müssen weitere Informationen zur verwendeten Erweiterung angeben.
Try to Unpublish it with PowerShell.
I can't use PowerShell since I'm using the SaaS sandbox hosted by Microsoft.
- Clear the cache from your VS Code
AL:Clear credentials cache
- add this "schemaUpdateMode": "Recreate" in the launch.json.
Note: Recreate will delete your data from the table.
This didn't help either. I get the same message as in my first post.
What that error means is that another tenant on the application service that hosts your sandbox tenant has an extension published that has the same name, publisher, and version as the extension you are attempting to publish. Extensions are identified by their name/publisher/version combination so we cannot allow multiples as it would prevent us from being able to uniquely identifying an extension. In addition, the publish process used by VSCode uses the AppID to remove an existing instance of the extension (if one exists) so in sandbox tenants that needs to be unique as well.
We recognize that these limitations are problematic for many development scenarios, so this has been addressed for the next release.
The best way for you to work around this error today is to change the Name and AppID of the extension that you are publishing. This is temporary and will no longer be necessary after the next release.