You C# files should contain $LastChangedRevision: $
to get the SVN revision added. However, you also need to set the svn:keywords
property 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.
string revision = "$LastChangedRevision: $";
The svn:keywords
property should include the LastChangedRevision
in its space-separated list of values.
You can make this automatic for the cs
extension by editing the TortoiseSVN configuration. To do this, go to the TortoiseSVN explorer menu and select Settings...
. Then on the General
tab, click the Edit
button next to Subversion 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):
*.cs = svn:keywords=LastChangedDate LastChangedBy LastChangedRevision Id URL;