[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: Kenneth Goldman <kgoldman_at_us.ibm.com>
Date: Thu, 27 Aug 2009 16:17:12 -0400

Yves Goergen <nospam.list_at_unclassified.de> wrote on 08/27/2009 04:03:54 PM:

> But it seems there is none and there is none desired by the SVN
> 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.

The problem I see with this is that if you ever 'svn export' your source
to some other person who doesn't have access to the repository, they
won't be able to compile, because they will have $Revision$ rather
than a real value.

Like you say, it's a hack. I certainly desire a real solution.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 22:18:10 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.