Alex Rivera | Logout

Embedding SVN Revision number at compile time in a Windows app

Asked 2008-09-30T00:27:51.783
19

I'd like my .exe to have access to a resource string with my svn version. I can type this in by hand, but I'd prefer an automated way to embed this at compile time. Is there any such capability in Visual Studio 2008?

Edit
Report

1 Answer

16

How about using SubWCRev the command line tool that ships with TortoiseSVN. You create a template file with tokens in it like $WCREV$ $WCDATE$ etc. Then have a pre-build step that run SubWCRev on your template file to create the actual source file that is fed to the compiler.

answered 2009-10-16T06:27:01.367

Your Answer