Closed Tonygithub17 closed 5 years ago
See #2779 and #1704
Is it any better way to do it? Based on the solution given need download Extension then remove dependency only can publish. Feel a bit weird.
For now, you need to remove the extensions depending on your extension before publishing it. We will use this issue to track future improvements on it.
@qutreson , does this ticket also include installing extensions from VS Code?
I mean: in a customer we are considering creating a "base" extension, with some customizations to the base tables, and after that, create an extension for each big feature/customization that the customer requires, so that they can be developed/updated/uninstalled independently.
Problem: if at any point we need to make a change to this "base" extension, we need will need to manually uninstall every extension before we are able to update it. In a big project, were this can happen frequently, this can become huge annoyance.
We are not there yet, but we are already creating tests codeunits for some projects, and every time we discover a bug in the main extension, we have fix it in the main extension, uninstall the test extension, unpublish the test extension, publish the main extension, publish de test extension, and repeat.... :(
@qutreson ,
I work for a group of companies and we have the Solution Development Granule hired in our license so, together with my colleagues, we support all the customization needs that our business users have.
We are currently in a version 5 of Navision and we are beginning to see how to fit all our customizations under the new paradigm of programming in Business Central OnPremise, but we do not know how to segment in one or several Extensions all our customizations so that the modifications to fix any bug and especially to build new developments that change the business logic of several features at the same time does not become a hell of dependencies that causes errors when uploading to production ...
Is there an Official Good Practice Manual that allows us to know how to organize Workflows for a Development Team that supports a great group of Business Users and with a high degree of personalizations over the standard functionality?
We are clear that an Extension for each Open Issue is a crazy idea ...
Hi @qutreson, in our context of the need to make daily and frequent modifications in an OnPremise installation of BC, we believe that a good working model could be to separate the structure of the tables and the rest of the code in 2 different projects under the same workspace ( you can see #4363 and #4364 for more information) ...
Well, the problem is that when we publish changes to the DATA extension
, we get this error:
Changing the SchemaUpdateMode = Recreate
does not solve this problem.
The uninstallation and unpublishment of the UI extension
that depends on DATA Extension
didn't work, since the following error appears:
In scenarios OnPremises (internal maintenance of the software), we can not consider increasing the version for every small adjustment that every team member could make and deploy in our Development server to be able to test it.
The uninstallation and unpublishing of the DATA Extension
should be the solution, but surprisingly something does not work well and although it is no longer visible on the Extensions Page, the same error keeps appearing and we can not publish the changes ...
However, with the following command, we can see that the DATA extension
remains included in the list of those published on the server:
Get-NAVAppInfo -ServerInstance bcentral
Finally we had to execute the following command on the server to get the total cleaning of the previous code:
Unpublish-NAVApp -ServerInstance bcentral -name BCentral_Data
Working like this is impossible even in development and testing environments ... much less in production... please improve soon.
This is also an issue when you are writing tests. If you uncover errors in your product with tests, you cannot update the product until you unpublish your test app.
I just encountered the same issue as @JavierFuentes. We also decided it best to split the solution into a Data Extension and the Business Logic one. Currently the Data Extension seems stuck after I tried to publish the BusinessLogic one for a 2nd time. I have tried the following in the DataApp:
1) Recreate in Launch.Json 2) Increasing the AppVersion 3) Uninstall-NAVApp 4) Unpublish-NAVApp 5)Sync-NAVApp 6)Sync-NAVApp -Mode Clean
It remains in Get-NavAppInfo and we can´t republish.
Luckily we are still in testing fase of the project but this makes me really nervous. What if this happens on Production? Considering leaving the data layer in good old CSide.
BC OnPrem CU2
Ok for those of you that are completely stuck like I was; if you use SQL to go to the Nav App table you can delete your extension and republish without losing data.
Hi @BartPermentier, could you post here in which table(s) can we delete our extension using SQL?
Seems I can't execute the Unpublish-NAVApp
PowerShell command remotely from my laptop to our Development Server because it doesn't have any -Server
parameter...
I'm forced to run it by Terminal Server directly on the server but this is not agile for daily work.
Hi @BartPermentier, regarding the Workspace model with 2 Extensions separating the data structure from the business logic, I have to say that it seems that today it is not yet fully supported by MS... you can see #4450... I hope they fix this soon.
In #4363, I suggested the creation of new data types TableData
and TableDataExt
different from Table
and TableExt
so that in the TableData
only the information of the fields and types that we want to add to a new table (or an standard one) without any kind of business logic was defined ...
They would work like the Interfaces in object-oriented programming languages and would allow the majority of the necessary daily modifications to be uploaded knowing that no structural changes are being made at the BD level.
Perhaps if this suggestion receives enough support, MS will consider it seriously.
@JavierFuentes : the [Nav App] table in Sql.
I was to told to put my suggestion from #4584 to here:
Regarding this issue, I suggest that even if other extensions depend on an extension it, while publishing the Service Tier should check further if this chance breaks the dependent extensions.
What I experience (even with Build 14.0.27617 aka Partner Preview 04 of April Release) that if I rearrange page extensions fields on a page with the new Designer (which saves that changes as Designer Extension) and try to publish the base extension I get the error message:
The request for path /bc140/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: The extension was unable to be deployed due to a dependency between extensions.
Even though I didn't change anything in the extension. As long I don't remove that rearrange fields in the page extension publishing should be possible.
This also happens with translations files. Found a spelling error in a client custom field and updated the translations xlf, and now I need to uninstall several extensions and republish. Terribly inconvenient.
Is there any update on this or it's something that will still require uninstalling related extensions?
Please try the latest developer preview https://freddysblog.com/2019/07/31/preview-of-dynamics-365-business-central-2019-release-wave-2/ The work done in this area https://docs.microsoft.com/en-us/dynamics365-release-plan/2019wave2/dynamics365-business-central/improved-app-dependency-handling-build-deploy should address this issue.
I create the new extension to extension the Customer List page then publish it using VS Code. After that i go to Webclient designer mode to pull field in Customer List then save it as New extension name.
Then i go back my Extension that created early. Click Publish then i get the following error message. The request for path /nav/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: The extension was unable to be deployed due to a dependency between extensions.