Means of finding what XAMLS are used in a Project vs what is not?

I have a XAML clean-up situation currently. I used another project as the basis for developing something else. So I have XAML files which I never used which are still in the new project. I’m using v2020.10 Studio currently … hoping to soon upgrade to v2022.04 as our Orchestrator was recently upgraded in DEV (IT Security approval still pending for the updated UiPath Extension and all that :frowning: )

Is there anything in Studio or maybe a external approach which gives a tree view almost of what XAML file reference relationships exist from say main.xaml ?

This would be a great starting point for me to unwind what is not used and what is used and clean this project up a bit.

Curious if anyone else has dealt with this.

TIA !!

This post will help you… How to detect unused xamls from a project - #2 by Pablito

You can identify all invoked xamls using the search bar as described above and then delete the xamls that are not being invoked.

1 Like

Oh !!! Let me check that out. Thank you for the link.

If that ends up working for you, please mark my answer as solution to make it easier for other Forum members to find answers :slight_smile:

That is helpful. But, unfortunately you can not dump the research results to a file.

And unfortunately it provides results for ALL files within the project. That did sorta help though. I can do it using Search but somewhat iteratively. All my developed workflows within the REF are within primary folder so:

  • (LOOP) Open main.xaml (and in other search for xamls called from main.xaml)
  • Search for my primary folder holding my xamls (and the underlying folders of other xamls) within “Current File” (CTRL+1)
  • Manually notate list (can’t save this :frowning: )
  • Repeat this search on the notated files. (go back to LOOP)

This will be give list of every within my primary folder that is called from main.xaml … I’m pretty sure anyway.

One kinda nutty idea for your “manually notate list” bit…if you have access to OneNote you can use the snipping tool to take a screenshot, paste it into OneNote and then right-click on the picture in OneNote and select Copy Text from Image. That might make things somewhat easier, though still manual.

Depending on what version of UiPath Studio you are using there is a menu-item at the top called “Remove Unused” and workflows is one of the options in there. I am using Studio 2022.4.3

Yes, I use OneNote a lot myself. I am very curious to see what the v2022.04 Studio can do about unused xamls. Curious what it does in this situation:

main.xaml → A → B → C (everything here is used)
D → E (unused - would it delete them ?)
F → G → H (unused - would it delete them ?)

And I wonder what the Unused Dependences is. Need to read up on it.

I am not 100% certain but I think basically if it’s invoked anywhere then it’s consider “used.” I just did a test with 4 workflows, Main, TestSequence1, TestSequence2, TestSequence3. TestSequence1 is invoked in Main and TestSequence3 is invoked in TestSequence2, but TestSequence2 is not invoked anywhere. When I hit the Remove Unused Flows button it deleted TestSequence2.

So … if you ran it again, it should delete TestSequence3 I would think. So it might be a repetetive thing.

1 Like

Yessir, just confirmed that. :+1:

Ok that answers my question :slight_smile: Thank you for the testing you did … very helpful !! I just need to be a little more patient and after I upgrade to Studio v2022.04, do what you did in your testing.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.