RAD issues with multi-root project
I would like to report and issue related to RAD publish. I used to the get an 'error AL0670' while trying to use RAD publishing.
error AL0670: Fast publishing failed because the RAD file has specified a non-existing application object of type : 'Codeunit' name: 'Email Management2' ID: '50113' to be added or modified. Please do a full publishing before issuing a fast publishing again.
- I tried to do full publishing, but it has not effect.
- I tried to delete all rad.json files, it also did not have any effect. Full Publishing re-generates incorrect rad.json
- This object and it's file name has changed some time ago.
Naturally, project compiles & publishes successfully using Normal publishing command (ctrl+f5)
This issue occurs when you have multi-root project with dependencies.
My solution contains 3 extensions: foo, core, and core.test.
Core.test depends on core core depends on foo
Extension foo contained renamed codeunit Email Management2. Error occurred when I tried RAD puslihing from with core.test app.
I managed to solve the problem, my using full publishing from each extension. (foo, core, & Core.test). After that, RAD issue was gone and I could call RAD publishing from Core.test (not clear if it works correctly anyhow)
But it seems that full publishing does not work nicely with dependent extensions.
Expected behavior: when using full publish from core.test app, I expect that all 3 apps are fully republished (foo, core, & core.Test) when using RAD publish from core.test app, I expect that RAD takes into account deltas done to any of the dependent extensions and publishes deltas accordingly.
Best Regards, Gintautas
"Expected behavior: when using full publish from core.test app, I expect that all 3 apps are fully republished (foo, core, & core.Test)" By full publish you mean the command : AL: Publish full dependency tree for active project and not Ctrl F5 or F5, isn it? Since dependency publishing only publishes dirtied projects. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-work-workspace-projects-references Also for RAD, teh current implementation is that you will do a RAD publishing of teh active project and RAD publishing of its forward dependencies.
By 'full publish', I meant Ctrl+F5. It does publishes dependencies as well (see my screenshot bellow, which I took while using Ctrl+F5)

What's the difference 'Ctrl+F5' and "AL: Publish full dependency tree for active project", then?
When it comes to your last sentence regarding RAD, I did not completely understand it. Do you mean, that if I want to do RAD, I would need to do it for each app individually?
Ctrl F5 will do a dependency publishing in a workspace. https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-work-workspace-projects-references
AL: Publish full dependency tree for active project", will always do full publishing. Everything from scratch. There are scenarios when these two are the same, when you only change core.test and Ctrl F5 publish core.test for example.
No that is not what I have meant on RAD. RAD will just do dependency publishing of the application object changes in the active project and the application object diffs accumulated in the other project references.