>> <snip>
>> And if you mean something like this:
>> 
>> [assembly:BuildTimeStamp("2005-01-25 14:58:00")]
>> 
>> then that doesn't really help.  It still leaves needing a solution to
>> exactly the same problem Raj posed in the first place: how do you
>> arrange for that text string to be whatever the time of day is at
when
>> the build occurred?
>> 
>> </snip>
> 
> Given that you can keep your assembly attribute info in multiple
> files this could be easily achieved with a console app rewriting this
> one attribute into a file in the prebuild event.

...well yes - I suggested using a prebuild step in the message I sent
before the one you quoted.  :-)  (I even posted an example of how to do
it!)  Still, what can you expect if you ask a rhetorical question?  ;-)

The real question I was trying to ask (and evidently failing to ask with
sufficient clarity) was: does Stoyan something I don't know about custom
attributes?  He seemed to be implying that you could solve the original
problem simply by using a custom attribute.

Since the original problem was essentially one of how you get the build
timestamp in there in the first place, I could see how custom attributes
offer any particularly helpful solution to that part - you were still
left with the problem of: "Yes, but how do I get the timestamp in
there?"

Once you've worked out how to get a timestamp string into a file as part
of your build process, a custom attribute is certainly one place you
might choose to put that.  But I'm not aware of any way of using custom
attributes that means you don't still need the prebuild step to get the
string in there.  (I.e. as far as I'm aware, it doesn't really matter
whether you put the info into a custom attribute or a string constant,
or an embedded resource, or even encoded into the name of a function
that you then read out via reflection! Either way you'll be generating a
source file in a pre-build step.)

I was just wondering if I was wrong, and there was some more cunning
solution that I'm missing.

-- 
Ian Griffiths

===================================
This list is hosted by DevelopMentor�  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to