views:

81

answers:

2

How do I configure my web application to display the current build number information and Subversion Revision number? I'm looking for something similiar to what SO does with its SVN Revision number.

A: 

What I do is have a version.xml file that the web app uses to display whatever is in it. Then as part of the build I excecute a nant script to modify the version.xml (and the assembly numbers) before the build using the build num from CC and the revision number from subversion.

Jaime
+1  A: 

you need to download the msbuild community tasks. I have it for a win project but it would be the same since I´m generating the AssemblyInfo file with it.

Edit: I found this dude that has a code sample. http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file

sebastian
I like this approach but I have two questions:1. How do I retrieve the information and display it in a page in an application?2. Can I use this approach in a .vbproj file?
Achilles
I see the code in the link you provided.
Achilles
after compiling the app with the new AssemblyInfo file you can get the version from CurrentAssembly in your app
sebastian
Another Link:http://thekindofme.wordpress.com/2009/04/27/svn-revision-number-as-version-nunmber-in-vs-through-a-build-target/
Achilles