{"title":"AppSourceCop Warning AS0126","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0126/","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-as0126, 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-as0126","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":"By specifying a different publisher name for your extension, you grant extensions from that publisher the permission to access the internal features of your extension.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Warning AS0126","slug":"appsourcecop-warning-as0126","at":0,"chars":1531},{"level":2,"title":"Description","slug":"description","at":130,"chars":183},{"level":2,"title":"Remarks","slug":"remarks","at":313,"chars":273},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":586,"chars":794},{"level":2,"title":"Related information","slug":"related-information","at":1380,"chars":151}],"text":"# AppSourceCop Warning AS0126\nInternalsVisibleTo should not specifying a different publisher name than the one of this extension.\n## Description\nBy specifying a different publisher name for your extension, you grant extensions from that publisher the permission to access the internal features of your extension.\n## Remarks\nSpecifying a different publisher name grants extensions from that publisher access to the internal features of your extension. This can lead to unintended access and potential security risks, as it allows external extensions to interact with your internal code.\n## How to fix this diagnostic?\nTo address the AS0126 warning, ensure that the InternalsVisibleTo attribute specifies the same publisher name as the current extension. If you need to grant access to internal features, consider using proper access control mechanisms or APIs. Here are the steps to fix this diagnostic:\n1. Identify the InternalsVisibleTo attribute in your extension's configuration.\n2. Ensure that the publisher name specified in the InternalsVisibleTo attribute matches the publisher name of your extension.\n3. If access needs to be granted to another publisher, evaluate whether it can be done through public APIs or other access control mechanisms.\n4. Update the InternalsVisibleTo attribute to reflect the correct publisher name or remove the attribute if it's not necessary.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGetting Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}