AL icon indicating copy to clipboard operation
AL copied to clipboard

An application object of type 'Codeunit' with ID '50100' is already declared by the extension

Open renebrummel opened this issue 6 years ago • 3 comments

Describe the bug When I edit an AL file outside of VS Code I keep getting the message An application object of type 'Codeunit' with ID '50100' is already declared by the extension.

There is no other file that declares this object. I'm in a clean new extension project with just the basic dependencies.

The weird thing is that my extension compiles properly. I just get the warning. My file is in C:/Temp/Test so it can't be the known UNC path problem.

To Reproduce Steps and to reproduce the behavior:

  1. Create a new codeunit
  2. Change the filename in Windows Explorer
  3. Have an issue.

AL Code to reproduce the issue

Expected behavior I expect I would not have any issues after renaming or editing a file externally.

Screenshots If applicable, add screenshots to help explain your problem. afbeelding

5. Versions:

  • AL Language: 6.1.362735
  • Business Central: On Prem 17.0

renebrummel avatar Nov 04 '20 10:11 renebrummel

probably related to https://github.com/microsoft/AL/issues/6077

dzzzb avatar Nov 04 '20 12:11 dzzzb

Hi! Thank you for reporting this issue with duplicate object declarations after external file edits.

We've verified through unit testing that the current language server correctly handles external file modifications — the workspace maintains exactly one document after an external edit, with no duplicate object declarations. This was addressed through improvements to the watched files handler and buffer management.

If you still encounter this on a current version, please don't hesitate to open a new issue.

Thank you for helping us improve the AL developer experience!

SBalslev avatar Mar 16 '26 15:03 SBalslev

Thanks for getting back to me. I haven't had this issue for several years so I was assuming it got fixed.

renebrummel avatar Mar 16 '26 16:03 renebrummel