Resharper is suggesting that string literals are localizable

风流意气都作罢 提交于 2019-12-05 11:25:31

问题


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?


回答1:


Under ReSharper / Options, go to:

Code Editing -> C# -> Localization

And check "Don't analyse verbatim strings"



来源:https://stackoverflow.com/questions/8900294/resharper-is-suggesting-that-string-literals-are-localizable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!