When I deploy a DLL into production, I occasionally need to know what
SVN revision it belongs to.  For example, if I need to compare my now
non-working revision to a known working DLL, I'd certainly need to
know under what SVN revision it was created, right?

So, how do we insert the SVN revision (which is a project-wide, not
file-specific) number?  Right now, the only options appear to be to
use a build process such as MSBuild or hobble together command-line
work-arounds. [1,2]

The best solution would be for VisualSVN to perform this revision
tagging task for me.  So, for example, in my AssemblyInfo.cs,
VisualSVN could look for a keyword and perform the keyword
substitution, much like the svn client might do on update/commit:

[assembly: AssemblyVersion("5.3.$Rev$")]

The only problem with SVN's keyword substitution is that the SVN
revision is only updated when the file is changed.  And how often do
we change the AssemblyInfo.cs file anyway?

To resolve this, VisualSVN could save the day by adding this very
simple but useful feature.  It is in the perfect position to do this
since it can inspect the project to determine the highest revision
number in the working copy as well as being integrated with Visual
Studio's build events.

Further, it'd be best if the revision keyword swapping was done in a
way that is at least compatible with either svn's keyword substitution
or the MSBuild community task or BOTH.  In other words, this feature
should not require code to be built using VisualSVN, especially for
teams where not all users are fully converted to VisualSVN.  Without
some level of compatibility, users would just be alienated away from
the product.

Thoughts?

---
References:

[1] "Use Subversion Revision numbers in your Visual Studio Projects"
http://www.codeproject.com/KB/architecture/svn_visual_studio.aspx

[2] "Insert SVN version and Build number in your C# AssemblyInfo file"
http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file

Reply via email to