microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
733 stars 243 forks source link

How to remove a page extension of a removed page? #6803

Closed CarloAxians closed 2 years ago

CarloAxians commented 2 years ago

We have created a page extension for the page "Cross Reference List" in the past.

This page is marked obsolete in BC17.

We have marked all the added fields as Obsolete and removed them in the next version of our add-on.

What remains is an empty page extension:

_#pragma warning disable AL0432 pageextension 11169130 "AXI CrossReferenceList" extends "Cross Reference List"

pragma warning restore AL0432

{ layout { } }_

We are now building for BC version 20 and get the error:

##[error]\base\src\pageextension\AXICrossReferenceList.pageextension.al(2,57): error AL0247: The target Page "Cross Reference List" for the extension object is not found

But if we try to remove the page extension we get the error:

error AS0029: The 'PageExtension' with ID '11169130' and name 'AXI CrossReferenceList' was found in the previous version, but is missing in the current extension. This will break dependent extensions.

What do we need to do to fix this?

ralf-escher commented 2 years ago

Maybe this is related to my issue #6583 (still open) 😞

Where do you get the AS0029 error? Within your build pipeline (using Run-AlPipeline)? We have found out, that the App Source Validation (Upload to Partner Source) does not complain if we simply remove our empty Page Extension. Currently we are having a similar issue with Enum Extension #6824. I hope I can also remove that one, like we did with the obsolete Page Extensions.

CarloAxians commented 2 years ago

Hi @ralf-escher,

We are using ALOps for our build pipeline and in the BC20-build we get this error. I have also posted this on Yammer: https://www.yammer.com/dynamicsnavdev/#/Threads/show?threadId=1435605430247424 and got the comment to ignore the AS0029 error, so now the build is succesfull.

I still hope this will be fixed in the final release of BC20, because I think we might get a problem then.

NKarolak commented 2 years ago

I am affected as well, as my app extended the Item Cross Reference feature as well. I now needed to delete my page extension object. Luckily, this was only an app for on-premises (yet I'm still using the AppSourceCop to be able to upload it later). So I have just disabled rule AS0029 completely. And I have to remember to restore it once my app version is released.

But if your app is already on AppSource, then you're kinda doomed.

@qutreson, please prioritize! Microsoft has started to delete objects and will continue to do so. This rule blocks us totally.

ralf-escher commented 2 years ago

@NKarolak as mentioned above you can simply remove your Page Extension, even if the App Source Cop is complaining in your build pipeline (see #6583)

NKarolak commented 2 years ago

Thanks @ralf-escher, but the error also pops up in my VS Code when attempting to build the app. Hence, I see no alternative. How come you don't get the error in VS Code?

ralf-escher commented 2 years ago

We also had page extensions for Item Cross Reference and we removed it. I used a build pipeline without checking against the previous app. The validation in the App Source was successful.

qutreson commented 2 years ago

AppSource validation currently ignores the rule AS0029 because of this specific issue.

qutreson commented 2 years ago

We have added support for obsoleting page extensions and page customizations from AL extension version 9.0.599475