I\'m using TortoiseSVN and Visual Studio 2008. Is there any way to update my project\'s assemblyinfo.cs with svn\'s version in every build?
For example, 1.0.0.[svn\'
Yes, you can add a pre-build event that calls a script which
svn info to extract the current revision number (if you do an update before, you can directly include the keyword $Revision$ in a file, check also this post);What I usually do is transform a AssemblyInfo.cs template when the project is built. The script is necessary to adapt the form of $Revision$ to the syntax of this file, unfortunately.
The interesting properties are (where the template strings are between '$'):
[assembly: AssemblyVersion("$v$.$build$.$Last Changed Rev$")]
[assembly: AssemblyFileVersion("$v$.$build$.$Last Changed Rev$")]
Edit: svn info is part of the standard SVN client, not TortoiseSVN as pointed out in another post. Easy to install though. However, TortoiseSVN comes with SubWCRev.exe which transforms a file with keyword substitution, so it would do the trick if you update your local copy.