When adding a library to a project, if the library only contains UI Objects, the Analyzer will display a warning indicating that the library package is not in use.
UiPath support indicate this is expected:
“The warning has no actual impact on your library, it is only to inform you that there are no activities for that specific package, which, in this case, is correct.”
It is correct, yes, but it is a very strange behaviour nonetheless, and it then has a knock-on effect. Any dependencies of the library itself seem to then also be flagged as not in use. E.g. this example displays that the UiPath.UiAutomation.Activities package is not in use:
In this case that is incorrect because there are UiAutomation activities in use throughout the project.
Another effect this has is to render the “Remove Unused” function useless for this project. If “Remove Unused Dependencies” is used, both of these packages are removed, which is not acceptable for this project. They are both requirements.
I’m flagging this as a bug, because it seems like the wrong behaviour to have even considering the fact that a UI library is supposed to flag as a warning here. I’m not convinced that showing a warning for this, even though it is technically correct is the right idea.
If my UI Library package is in use, I would expect it not to be flagged as unused. I would certainly not expect that it would be removed by the built in tools designed to help reduce package size.