There is already one extension is installed and published in Production environment.
I have updated code(done more development) in the same package, it is successfully compiled and package created(.app file) in extension folder in sandbox environment.
Now issue is what when I am going to upload that package into production environment, it is getting failed with below error message.
“Deploy Operation rejected. Error: An extension with same App ID and version has already been uploaded. Resolve and deploy again.;”
I tried to change Version in app.json file but it didn’t work.
Are you sure that you re-created package after version update?
P.S. when I re-install (by powershell command script) package I uninstall package first (but not unpublish it), then publish&install new version and after success action unpublish old version
Thanks for reply.
By re-create you mean SchemaUpdte = Recreate ?? If yes then We try that option in sandbox environment but my old data gets deleted(new field that I have created in extension package) when I use that. So, I don’t want recreate schemaupdate for Production environment.
We are uploading extension from Extension management page directly. And, yes we just uninstall package and try to upload new package but no luck. Error is still coming.
When you install a new version of an extension (with continuity of data desired) , then the process is:
- Publish new version
- Sync new version
- Upgrade (Start-NavAppDataUpgrade) to the new version
- [optional] Unpublish old version
But this seems not to be the issue here!
When publishing to a non-sandbox environment, then it’s important that your update the version number of the extension, each time you publish a new app file. If you did update, and re-build after you changed the version in the app.json file (think that’s what redfox means with recreate), then check if you have been using the same App ID for other apps. That could easily happen, if you create a new extension, by coping an existing app.json etc. and didn’t assign it a new app id guid.
To be honest either I don’t catch fully the source of issue or you did something wrong - you need to have for 1 version “version”: “184.108.40.206” in the app.json and for second - “version”: “220.127.116.11”. The “id”: “639c466e-xxxxxxxxxx…” should be same.
You no need to change something in the launch.json (include “schemaUpdateMode”: “Synchronize”).
You need to change version, then create new package (Ctrl+Shift+B) → move package to new “place” and then import it into NAV (I delete old package usually before 1 action to be sure that I have last newrly created package).
P.S. You may have issue with Data after import, but you need to create import-CU
Erik, Sorry, but could you advice me how to do step 3? Because I don’t understand your steps?
I did development without this procedure each day (for EU- and US-versions) and just change “schemaUpdateMode” from “Synchronize” to “Recreate” periodically.
There is difference in how you publish to a production or sandbox environment. When you work on your development with VSCode, then VSCode handles it for you, but only for this environment. The process above is for installing into “production”.
And Start-NavAppDataUpgrade is the powershell CmdLet you must use to upgrade your extension.
Thanks for information, but I never used this “Start-NAVAppDataUpgrade” for my version and all works fine… => I wrote that I don’t understand this step… same like “Sync new version”
but thank you again.
If you don’t have any “structural” changes and an upgrade function, then it is not required. Just like when you upgrade a major NAV/BC version.
Thanks RedFoxUA and Erik for reply.
I have successfully deploy extension package.
What I have done, I have update version change schemaupdate to recreate and publish on sandbox. Again, I have change schemaUpdateMode to “schemaUpdateMode”: “Synchronize” and publish on sandbox.
Now I have upload latest .app file in production environment and it is successfully uploaded.
P.S : I have not unpublished and uninstall version 18.104.22.168.
So, there is two extension package with same name but different version.