I have a rather large website that had its strings externalized. I wanted to know if there was a way to check to make sure that a resource object in the ASPX exists in the resource file that is being referenced? There are a few pages that get parser errors, but I want to be able to batch check all the files.
If there is a tool or some way to check all the files and you know how I would greatly appreciate if you would be able to assist me in this.
I was curious if this was possible as well, and could not find any useful information about this either. I made a proof of concept application which basically does 3 things
Go through the files in the subdirectory you select, and find the ascx and aspx files in it.
Search the files after the various possibilities for a resource string in them, parsing meta:resourcekey= and <%$ Resources: and flag them for being explicit or implicit depending on the key having a class or not. (Resources: tags only) and storing the local or global resx name.
Search through the specified local and global resourcepath depending on which type of resource it is, and search the found resx files with a ResXResourceReader, and add any missing keys from the parsed aspx/ascx files, to be viewed in a gridview.
It does not yet handle different languages, but that should be fairly easy to add. I'm sure i'm missing a number of other things, since we normally use xml files or database for our projects resources, but it is usable and if it doesn't suit your specific needs, simply modify the source which you can find here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With