Visual Studio - Tool to replace hard coded strings with resources

前端 未结 7 605
终归单人心
终归单人心 2021-01-02 22:07

I have a big ASP.NET project full of hard coded strings, that now have to be extracted to resources. Such strings can be found almost anywhere (in .cs files, .aspx files, .a

相关标签:
7条回答
  • 2021-01-02 22:34

    Try RGreatEx. This is a plugin for ReSharper:

    RGreatEx is the most powerful localizer and coding helper for Visual Studio. Once installed, it lets you localize .NET applications and produce safer code, saving up to 95% of time the developer usually spends on doing the same by hand. Empower yourself with time-saving refactorings, such as "Move to resource" and "Rename resource". The plug-in will automatically analyze string and resource usage and suggest moving strings to resources.

    0 讨论(0)
  • 2021-01-02 22:35

    You could take a look at the resource refactoring tool at

    http://www.codeplex.com/ResourceRefactoring

    It's an instance-by-instance tool rather than a batch replacement tool. It's free and standalone so you don't need Resharper or Coderush.

    0 讨论(0)
  • 2021-01-02 22:38

    I've just published new tool called Jinnee.Package for string refactor. You can find it on Visual Studio gallery: http://visualstudiogallery.msdn.microsoft.com/7ec5a225-dea4-47ae-8ebc-450d2980937f?SRC=Home

    0 讨论(0)
  • 2021-01-02 22:44

    VisualStudio lets you search and replace with RegEx. It won't be the "fix all in one shot" solution, but it should cut back on the amount manual work significantly.

    Just a thought.

    0 讨论(0)
  • 2021-01-02 22:47

    If you have a look at DevExpress' CodeRush it has the functionaility you are looking for, you may need to automate it to do it a all in one shot.

    It has a great deal more too!

    Kindness,

    Dan

    0 讨论(0)
  • 2021-01-02 22:54

    Do you have ReSharper? Then you perhaps should wait for version 5.0. It will have RGreatEx (mentioned by Anton) functionality included. Read the thread from the R# forum on this topic.

    Update: The feature will be in R# 5.0. See the official announcement.

    0 讨论(0)
提交回复
热议问题