How to use the LazarusIDE.ActiveProject.AddPackageDependency function? lazarus / 9-Editor ---------------------------------------------------------------------- fcb · 2025-02-14 22:56 I'm developing a component that has a certain property, and when changing the value of this property the component would have to add a new package dependency to the project. I was able to do this using LazarusIDE.ActiveProject.AddPackageDependency(), but the same is added to the broken project, see the attachment when added the LCLBase package Thanks ---------------------------------------------------------------------- JuhaManninen · 2025-02-15 18:41 Quote from: fcb on February 14, 2025, 11:56:31 pmI was able to do this using LazarusIDE.ActiveProject.AddPackageDependency(), but the same is added to the broken project, see the attachment when added the LCLBase package Is the project broken? Can you build it? What if you close and open it again? ---------------------------------------------------------------------- fcb · 2025-02-17 03:54 Quote from: JuhaManninen on February 15, 2025, 07:41:56 pmQuote from: fcb on February 14, 2025, 11:56:31 pmI was able to do this using LazarusIDE.ActiveProject.AddPackageDependency(), but the same is added to the broken project, see the attachment when added the LCLBase package Is the project broken? Can you build it? What if you close and open it again? The project is not broken, but when I compile it it warns that the dependency is broken. If I close and open the project again, the dependency will no longer be broken and everything compiles normally