{"title":"AppSourceCop Error AS0066","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0066/","by":"JOP-AL","license":"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-as0066, 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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0066","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"A new method to an interface that has been published must not be added, because dependent extensions may break","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Error AS0066","slug":"appsourcecop-error-as0066","at":0,"chars":1933},{"level":2,"title":"Description","slug":"description","at":100,"chars":126},{"level":2,"title":"Remarks","slug":"remarks","at":226,"chars":889},{"level":3,"title":"Adding functionality safely with default methods","slug":"adding-functionality-safely-with-default-methods","at":538,"chars":577},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":1115,"chars":560},{"level":2,"title":"Related information","slug":"related-information","at":1675,"chars":258}],"text":"# AppSourceCop Error AS0066\nA new method to an interface that has been published must not be added.\n## Description\nA new method to an interface that has been published must not be added, because dependent extensions may break\n## Remarks\nThis error occurs when an attempt is made to add a new required method (a method without a body) to an interface that has already been published. Adding a required method changes the interface's runtime identifier and forces all dependent extensions to implement the new method, which can break them.\n### Adding functionality safely with default methods\nInstead of adding a required method, you can add a default method - a method with a body. Default methods are optional: existing implementors continue to compile and use the default behavior. Because default methods don't affect the runtime identifier, no dependent extensions break.\nIf the method must eventually be implemented by all consumers, use the ../attributes/devenv-requiredpending-attribute on the default method first, then transition it to required in a later version. See ../devenv-interface-method-lifecycle.\n## How to fix this diagnostic?\nTo resolve this error, choose one of the following approaches:\n1. Add the method as a default method (recommended): Give the method a body so it has a default implementation. This doesn't break existing implementors.\n ```al\n interface IMyInterface\n {\n     procedure ExistingMethod();\n\n     // New method with a default implementation - safe to add\n     procedure NewMethod(): Boolean\n     begin\n         exit(true);\n     end;\n }\n ```\n2. Remove the method: If the method isn't needed, restore the interface to its original state.\n## Related information\n../devenv-interfaces-in-al\n../attributes/devenv-requiredpending-attribute\n../devenv-interface-method-lifecycle\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}