Resharper is suggesting that string literals are localizable

Brandon picture Brandon · Jan 17, 2012 · Viewed 11.8k times · Source

One of the suggestions of Resharper 6.0 was to localize strings, and if I didn't want a string to be localized, I could suppress the warning by converting it to a verbatim string literal by adding a @.

After upgrading to Resharper 6.1, this doesn't work anymore. Even verbatim string literals are showing the warning.

Disabling localization or suppressing the warnings isn't an ideal option. I do use localization so the warnings are helpful, and I don't want to have the disable comments littered everywhere.

Is there an option to get Resharper 6.1 to ignore verbatim string literals?

Answer

Rob H picture Rob H · Jan 17, 2012

Under ReSharper / Options, go to:

Code Editing -> C# -> Localization

And check "Don't analyse verbatim strings"