ReSharper Web Help

Using file headers for copyright notices and other identifying messages is a common practice. ReSharper provides a handy way to automatically insert a common file header into code files of your solution.

To configure a file header and insert it into code files
  1. Choose ReSharper | Options in the main menu.
  2. Open Code Editing | File Header Text page of ReSharper options.
  3. In the File Header Text area, insert an arbitrary text that you want to insert into your code files. You can also use macros that allow file headers to contain varying information. To use a macro, type it or click on the corresponding macro, it will be inserted at the current caret position.
  4. Optionally, to surround the file header with a region, enter the name of the region in the Embrace File Header into Region with Name field.
  5. Open Code Editing | Code Cleanup options page.
  6. Create a new profile as described in Creating Custom Profiles. In the Selected profile settings for the new profile, choose Update file header.
  7. Click Save to apply the modifications and let ReSharper choose the settings layer, or choose a particular settings layer in the Save To drop-down list. To learn more about saving ReSharper settings, see JetBrains .NET Tools Blog: Save or Save To in ReSharper Options.
  8. Choose ReSharper | Tools | Cleanup Code in the menu to open the Code Cleanup dialog box for the current file or for a solution node (see Running Code Cleanup for details), and then select the newly created profile in the Available Profiles area.
  9. Click Run to perform Code Cleanup. ReSharper will update all affected files with the new file header.

See Also

Concepts

Procedures

Reference