Finding unused strings in all .resx of a solution

S

schaf

Hi all!
I would like to check if there are some resx keys, which will not be
used in the source code. Is there a plugin or another possibility to
evaluate this issue?

Regards
Marcel
 
A

Alberto Poblacion

schaf said:
I would like to check if there are some resx keys, which will not be
used in the source code. Is there a plugin or another possibility to
evaluate this issue?

I don't think that a plugin would be reliable to determine the keys that
are used by a general arbitrary program. Imagine that your resx contains a
key named "string123" and your code does:

int i=123;
key ="string"+i;
x = GetGlobalResourceObject("WebResource",key);

This uses your "string123", but how would an automated tool conclude this
from the source code? What if the "i" variable above is a computed value
that depends on inputs provided at runtime?
 
S

schaf

   I don't think that a plugin would be reliable to determine the keysthat
are used by a general arbitrary program. Imagine that your resx contains a
key named "string123" and your code does:

int i=123;
key ="string"+i;
x = GetGlobalResourceObject("WebResource",key);

   This uses your "string123", but how would an automated tool conclude this
from the source code? What if the "i" variable above is a computed value
that depends on inputs provided at runtime?

No I would like to do just a short check if all my keys in the resx
are also used in the code. I do not compose keys so maybe this check
can be done ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top