DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Remove unused Variables Error #175

Open Mike-D-117 opened 5 months ago

Mike-D-117 commented 5 months ago

Hey,

one of my most needed Cleanup is not working atm:

Method not found: 'Microsoft.Dynamics.Nav.CodeAnalysis.Compilation Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.Create(System.String, System.String, System.Version, System.Nullable1<System.Guid>, System.Collections.Generic.IEnumerable1, System.Collections.Generic.IEnumerable`1, Microsoft.Dynamics.Nav.CodeAnalysis.CompilationOptions, Microsoft.Dynamics.Nav.CodeAnalysis.IFileSystem, Microsoft.Dynamics.Nav.CodeAnalysis.DotNet.IDotNetResolverFactory, Microsoft.Dynamics.Nav.CodeAnalysis.IReferenceManager, Boolean)'.

Is there anything I missed to setup or change?

christianbraeunlich commented 5 months ago

Yesterday the new al language version was released, and with it some breaking changes.

As a workaround you can switch back to the previous AL language version, which might fix the error atm: image

DavidFeldhoff commented 5 months ago

Thanks for the analysis @christianbraeunlich 🙂 Regarding the cleanup tasks, Andrzej (author of the AZ AL Dev Tools) implemented as well a cleanup task after I've implemented it, which is better then my one, so I'm considering to remove it in the future. Check out his "Remove Unused Variables from the Active Project" as well