[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: Daniel Becroft <djcbecroft_at_gmail.com>
Date: Fri, 28 Aug 2009 16:29:23 +1000

(Resending w/ "Reply All")

On Fri, Aug 28, 2009 at 4:11 PM, Yves Goergen
<nospam.list_at_unclassified.de>wrote:

> On 27.08.2009 22:17 CE(S)T, Kenneth Goldman wrote:
> > 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.
>
> No, the "$Revision$" is of course not in effective source code as it
> would be totally in the way there. It's just in a // comment line so the
> compiler won't ever see that information. My script just tries to grab
> it from that line and copy the bare number into the active code line so
> that it can compile. The repository always has the version number
> "x.x.x.0" in that place, so if you won't use the script, you just won't
> have the revision number in the code, that's all.
>
> Right now the script throws an error and aborts the build if it cannot
> find a revision number, but that could be turned off as well.
>
> But anyway, whenever the file AssemblyInfo.cs is fetched from the repo,
> it should always have that keyword expanded, if I understood that right,
> so everybody who works offline on a repo dump can use it as well, just
> with a maybe outdated revision number in it. But those builds are not
> supposed to go to our client anyway.
>

So what should happen with the keyword upon commits and/or updates, or
(worse still) mixed revision working copies? If AssemblyInfo.cs hasn't been
changed, then my understanding is that it won't be scanned for keyword
substitution during either action.

>
> BTW, my first try was to use something like this:
>
> [assembly:AssemblyVersion("1.0.0." + "$Revision$".Substring(...))]
>
> but the C# compiler expects static or constant values there.
>

Cheers,
Daniel B.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2388132

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