[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: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 18 May 2009 17:29:15 +0200

Oddvar Kloster wrote:
>
> ------------------------------------------------------------------------
> *From:* Roger Lipscombe [mailto:roger_at_differentpla.net]
> *Sent:* 18. mai 2009 13:07
> *To:* dev_at_tortoisesvn.tigris.org
> *Subject:* Re: SubWCRev.exe weirdness when used in website .NET project
>
> On Mon, May 18, 2009 at 10:33 AM, Nick Gilbert <nick_at_x-rm.com
> <mailto: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.
>
> Cheers,
> Roger.
>
>
> How about introducing a utiliity project that is a dependency of your
> main project? This project updates your Version.h (say, in a pre-build
> action), before your main project checks which files need to recompile.

Just a thought:
you could try deleting the object file of version.cs either before or
after calling SubWCRev - that would force the compiler to rebuild that file.

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2300877
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2009-05-18 17:29:34 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.