2

I am working with Resharper 2018. My boss wants me to set some of the custom rules in Resharper tool. Now I would like to know is there any way to set such rules for moving a specific file to a specific folder.

For example, A class name with the suffix “Service” (e.g. AccountService) will be moved to the folder named “Services”. It means whenever I will create a class outside of the Services folder with the suffix Service there will be a suggestion from Resharper to move that file into the Services folder.

Another rule can be, creating a file with .html extension, outside of the “Pages” folder, there will always be suggestions from Resharper to move that files to the Pages folder.

I see that a built-in option available for moving files to the specific folder according to it's Namespaces.

Now I would like to extend this features for the above cases. Please let me know any suggestions or tutorials for doing that.

Thank you all.

mnu-nasir
  • 1,642
  • 5
  • 30
  • 62
  • Out of the box, this isn't possible, however, you can write a custom plugin for this. Here is some introduction to the topic: https://www.jetbrains.com/help/resharper/sdk/README.html – Matthias Aug 10 '18 at 11:10
  • Thanks for your suggestions @Matthias – mnu-nasir Aug 10 '18 at 13:11

0 Answers0