Does anyone know what the syntax is to use the file revision keyword within the code in C#? I know how to use it in SQL Server but I can’t seem to get the syntax right. I have already added the property to the file in which I would like to display the version.
Share
Your C# files should contain
$LastChangedRevision: $to get the SVN revision added. However, you also need to set thesvn:keywordsproperty correctly for the files in which you want that value to be expanded.For example, the following will result in a string containing the revision.
The
svn:keywordsproperty should include theLastChangedRevisionin its space-separated list of values.You can make this automatic for the
csextension by editing the TortoiseSVN configuration. To do this, go to the TortoiseSVN explorer menu and selectSettings.... Then on theGeneraltab, click theEditbutton next toSubversion configuration file:.Scroll down and add a line like this one into the
[auto-props]section (just an example, you may have more or less keywords and you may also set other properties):