[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: Bob Archer <bob.archer_at_amsi.com>
Date: Thu, 27 Aug 2009 09:57:47 -0400

> I would like to use the SVN revision of a source code as the 4th part
> of
> the version number in the AssemblyInfo.cs file in a C# .NET project.
> Unfortunately the keyword substitution that SVN provides cannot easily
> be
> used for that task. All I need is the plain number with no junk around
> it.
> And if I create a build task that alters the file before a build, it
> will
> be marked as changed and wants to be commited after each build.

So, commit it. This is what our build does... we use the build number not the svn revision number since it is meaningless because we have multiple projects in the same repository. So, get the revision with svnversion and use it to build/update your AssemblyInfo file(s). You can choose whether to commit your AssemblyInfo changes or not. We do commit it. Make sure you tell your CI server to ignore changes to those files so they won't trigger another build, or your builds will just keep firing.

I recall reading somewhere that CruiseControl.Net supported a labler that used the svn revision... but I can't seem to find that right now.

BOb

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

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