How do I set value of $HEADER$ template variable (macro)?
Answered
How do I set the $HEADER$ value that gets inserted into new files?
Please sign in to leave a comment.
Hello.
Rider uses ReSharper settings of a file header. Unfortunately, at the moment we do not have UI for editing it in Rider.
Here is a corresponding issue. Please, feel free to vote for it.
As a workaround, you can configure header text in ReSharper, export settings and import them to Rider.
Or the second way is to add `filename.dotSettings` file from attachment to the project folder near the .sln file. Rename it: mySolution <--change it according to the solution name. Then type your file header inside of <s:String> tag, don't forget to escape the string. And to import this file into RIder.
To import setting in Rider open Preferences. On the left bottom corner press button "Manage Layers". In the opened window select any layer you want to modify and press the button "Import from" and select .dotSettings file.
A .dotSettings file example
If you have other questions, please, let me know.
Kind regards,
Sofia.
How do you properly escape the HEADER string? I have blank lines I need to maintain and they are getting stripped.

 works for me
Any updates on this? This seems like the only way to set a standard copyright header into all new files, and yet there hasn't been any progress on almost a year?
Hi,
Here is an issue to track the status: https://youtrack.jetbrains.com/issue/RIDER-6461. One can upvote it to subscribe for updates.
Kind Regards,
Sofia.
I don't think the issue is only "nice to have", why is it labeled that way? How many votes are needed for that issue to get on anyone's radar?
Hi Sofia,
In the issue track you mentioned (https://youtrack.jetbrains.com/issue/RIDER-6461.) it seems to be solved now in the 2020.3 version of RIDER.
But I'm currently working on the Rider for Unreal Engine public review, and the actual version of the IDE is the 2020.2.2. So I tried the DotSettings file workaround but Rider for Unreal Engine does not seem to understand the Key /Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue.
Do you have any clue on this?
Regards,
EDIT: Oh sorry it's working! I've just have to restart the IDE when i change the DotSettings