[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: C# AssemblyInfo integration

From: Yves Goergen <nospam.list_at_unclassified.de>
Date: Thu, 27 Aug 2009 22:03:54 +0200

On 27.08.2009 09:44 CE(S)T, Martin Rabl wrote:
> I did it with a "make" script (cmd-Batchfile), which patched the
> source and after it compiled the complete project - pretty ugly, but
> it runs quite good, and makes a new Revision every time I recompile.

Thank you. That was my try, too, before I turned to this mailing list
today. I didn't get it to work at first so I thought there could
possibly be an easier, more transparent way.

But it seems there is none and there is none desired by the SVN community.

So I headed back to my batch scripts, took out the magic spell book for
cmd.exe and a few UnxUtils tools and finally managed to create a
solution that runs as pre-build and post-build commands. The pre-build
script finds all required tools, the file itself, reads out the revision
number from a $Revision$ that I have inserted into a comment in
AssemblyInfo.cs, makes a backup of the file and patches the file to
replace the fourth version part for AssemblyVersion and
AssemblyFileVersion with the SVN revision. Then the build occurs. In the
post-build script, the backup file is restored so it won't show up as
changed in the project explorer and the developer is not bugged to
commit it every time.

It works now. It's a hack, but it seems to be stable enough.

-- 
Yves Goergen "LonelyPixel" <nospam.list_at_unclassified.de>
Visit my web laboratory at http://beta.unclassified.de
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2388002
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 22:05:01 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.