I have a project where for localization I use classic xml files instead of resx files and I have key value pairs. But now the files and the project have become so large that when I delete a key value pair from the file, its hard to notice if that key was used somewhere, i.e. the solution builds fine. So now I'm planning to use some kind of usages tracker for every key value pair, so if it gets removed by a mistake, it would show up as build error for example.
I am trying to use Microsoft.CodeAnalysis for this, so when a key gets deleted/modified it would do a find-all and if it finds an occurence of the key it would warn the user. But I don't know if searching all files in the solution by code is a good idea. I was thinking if I could use Visual Studio's find all functionality but through code, is that a thing at all?