[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: Jason Malinowski <jason_at_jason-m.com>
Date: Fri, 28 Aug 2009 00:36:12 -0700

Remember, Visual Studio project files are really MSBuild scripts in
disguise; I believe MSBuild supports the ability to create a piece of code
that can supply temporary files that should be used during a build. You
could provide a new file with the appropriate [assembly:] entry...

That said, if you have a system working, it might not be worth the
investment.

Jason Malinowski

> -----Original Message-----
> From: Kenneth Goldman [mailto:kgoldman_at_us.ibm.com]
> Sent: Thursday, August 27, 2009 1:17 PM
> To: users_at_subversion.tigris.org
> Cc: users_at_subversion.tigris.org
> Subject: Re: C# AssemblyInfo integration
>
> 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
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.
>
> 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.

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

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