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

SubWCRev.exe weirdness when used in website .NET project

From: Nick Gilbert <nick_at_x-rm.com>
Date: Fri, 15 May 2009 11:35:14 +0100


I have the following command set up as the pre-build event for one of my
projects so that the revision number is inserted in my version class.

"C:\Program Files\TortoiseSVN\bin\SubWCRev.exe" "$(SolutionDir)\."
"$(ProjectDir)\General\Version.in.cs" "$(ProjectDir)\General\Version.cs"

However I've noticed that despite this being a PRE build event, I need
to build TWICE for the correct revision number to be inserted in the
final binary.

When I build the first time, I get this:

------ Build started: Project: VBG, Configuration: Debug Any CPU ------
"C:\Program Files\TortoiseSVN\bin\SubWCRev.exe" "C:\inetpub\wwwroot\cmpdms\\."
        "C:\inetpub\wwwroot\cmpdms\VBG\\General\Version.in.cs" "C:\inetpub\wwwroot\cmpdms\VBG\\General\Version.cs"
SubWCRev: 'C:\inetpub\wwwroot\cmpdms'
Last committed at revision 563
Mixed revision range 561:563
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe etc...

But on the website, it displays version number 562 (ie 1 revision
behind) until I force another rebuild.
The version.cs file HAS been correctly updated to 563 BEFORE the
compiler was called and the new DLL has been copied correctly into the
website BIN folder (binary identical to the one that was just built in
the debug/release folder), so how can this possibly still show the OLD
value? In all other cases, I do not need to build twice to see changes
I make to my source code - it just seems to be this one value that's out
of date. If I modify any functions, the changes take effect immediately
after the first build. This is really weird!

I realise this isn't a problem or bug in TSVN as SubWCRev is working
perfectly but I thought that perhaps one of you may have come across
this problem before or perhaps had some insight in to how the website
build process works within Visual Studio?

Any ideas would be appreciated as this little glitch is really annoying
me :)



To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-05-15 12:35:30 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

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