# AppSourceCop Error AS0033
Views that have been published must not be deleted.
## Description
Views that have been published must not be deleted, because it will break dependent extensions.
## Remarks
Removing a view which has been published is not allowed because it will break dependent extensions which are referencing or modifying it.
> NOTE
> Renaming a view will also trigger this error. AppSourceCop will consider the renamed view as a new view, unrelated to the one defined in the previous version.
## How to fix this diagnostic?
If the view was removed, revert the change by adding back the view and mark it as ../properties/devenv-obsoletestate-property.
If the view was renamed to change its display string in the web client, consider using the ../properties/devenv-caption-property property instead.
If the view was renamed to comply with naming rules such as appsourcecop-as0011, consider obsoleting the view and introducing a new one.
## Examples of errors for dependent extensions
The following examples show some of the compilation errors that will be reported on dependent extensions if a view is removed from one version to another.
Version 1.0 of the extension defines a list page named MyListPage that contains a view named MyView. Version 2.0 does not define this view anymore.
### Example 1 - Extensions modify this view
If a dependent extension modifies this view in a page extension or customization, when compiling against version 2.0, this will lead to a compilation error similar to `The view 'MyView' is not found in the target 'MyListPage' (AL0533)`.
```al
pageextension 50100 SomePageExtension extends MyListPage
{
    views
    {
        modify(MyView)
        {
            Visible = true;
        }
    }
}
```
### Example 2 - Extensions referencing this view as an anchor for a change
If a dependent extension uses this view as an anchor for a change in a page extension or customization, when compiling against version 2.0, this will lead to a compilation error similar to `The view 'MyView' is not found in the target 'MyListPage' (AL0533)`.
```al
pageextension 50100 SomePageExtension extends MyListPage
{
    views
    {
        addafter(MyView)
        {
            view(SomeNewView)
            {
            }
        }
    }
}
```
### Example 3 - Extensions moving this view
If a dependent extension is moving this view in a page extension or customization, when compiling against version 2.0, this will lead to a compilation error similar to `The view 'MyView' is not found in the target 'MyListPage' (AL0533)`.
```al
pageextension 50100 SomePageExtension extends MyListPage
{
    views
    {
        movefirst(MyView)
    }
}
```
## Related information
AppSourceCop Analyzer<appsourcecop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0033, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0033/
