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

Re: SubWCRev.exe weirdness when used in website .NET project

From: Roger Lipscombe <roger_at_differentpla.net>
Date: Mon, 18 May 2009 12:07:15 +0100

On Mon, May 18, 2009 at 10:33 AM, Nick Gilbert <nick_at_x-rm.com> wrote:

> Roger Lipscombe wrote:
> > Visual Studio evaluates dependencies _before_ the pre-build actions.
> > You'll need to push the code that updates Version.cs into a macro,
> > rather than a build action. We have the same problem in our C++
> > projects (we generate Version.h2 from Version.h).
> Not sure what you mean by "evaluates dependencies". Are you saying it
> takes a copy of all the files and stores them elsewhere? I still don't
> understand how it can still see the old file AFTER the file has been
> modified. Where is it reading it from to get the old values?
> Nick..

At least in C++ projects, Visual C++ compiles the .CPP files into .OBJ
files. It will only recompile the .CPP file if it's newer than the .OBJ
file. Unfortunately, it checks this _before_ it runs pre-build actions. This
means that, if your pre-build action updates the .CPP file, it will be
ignored and the older (incorrect) .OBJ file will be used instead.

I assume, based on the description, that something similar's going on with
C# files as well -- it's ignoring the .CS file, because it doesn't spot that
the pre-build action has modified it. I assume that it only part recompiles
the assembly, leaving the "unchanged" files in there from last time.

Now, C# could be completely different, and I could be completely wrong, but
I figured that it might be worth your while looking into a pre-build macro,
rather than a pre-build action. It's a mess, but it might work.



To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-05-18 13:07:24 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.