ReSharper Web Help

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

To configure a file header and insert it into code files
  1. Choose ReSharper | Options | Code Editing | File Header Text.
  2. 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.
  3. 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.
  4. Choose Code Editing | Code Cleanup in the ReSharper Options dialog box.
  5. Create a new profile as described in Creating Custom Profiles . In the Selected profile settings for the new profile, select Update file header.
  6. Click OK to save the new profile and close the ReSharper Options dialog box.
  7. Open the Code Cleanup dialog box from the text editor or Solution Explorer as described in Running Code Cleanup . Note that triggering Code Cleanup upon a selection prevents ReSharper from inserting the file header.
  8. When the Code Cleanup dialog box opens, 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 file header.

See Also