[quoted text, click to view] RedLars wrote:
> On 27 Feb, 01:08, Jeroen Mostert <jmost...@xs4all.nl> wrote:
<snip>
> It sounds reasonable. I then read a chapter from the book ".NET
> Framework" (O'Reilly) where they state "runtime version - Indicates
> the runtime version that is required ro run this program" (1). Have
> also seen it explained as "minimum required version of the runtime" or
> word to that effect (cannot find the url atm). So part of the problem
> for me is a lack of good documentation on the matter. Do you have any
> thoughts?
>
Yes:
1. When it comes to books on a particular tool or technology, only read the
latest books on the latest versions, and toss everything else in the fire
when newer books come out. Nothing's as deadly as out-of-date wisdom. Point
in case: the book you're referring to was written when .NET 1.1 was still
new and hot, and .NET 2.0 actually changed the rules for how these fields
are used.
2. A technical book that has nothing more to say about a field called
"runtime version" than that it's the version of the runtime somehow is
wasting its audience's time. The authors can be excused for not knowing the
full details of every field in an assembly (heaven knows *I* don't know
them) but they should never stick to dangerously misleading assumptions out
of a desire to be complete. Readers can make educated guesses for
themselves; the reason they're reading a book is because they're not
interested in guesses.
3. The only sources that should be considered reliable are first-hand
sources. Other sources can be as valuable and reliable (or even more so) but
not automatically. The book I cited was written by Serge Lidin, who's not
just anybody: he's the Microsoft employee responsible for the design of MSIL
and the IL (dis)assembly tools. Though he's not the one responsible for the
assembly format, we can be pretty sure that his information on assembly data
is more reliable than that of most other sources.
To put it more bluntly: not everything that's written down is accurate,
sincere though the authors may be. Check author credentials and reader
reviews carefully, especially when you're talking about in-depth subjects
like these.
[quoted text, click to view] > Metadata Header major \ minor version // always 1 and 1? whats it
> used for?
I don't know, so the following is speculation. The metadata format is
versioned independently of the assembly format and runtime version to better
guarantee interoperability between the various components that process
assembly metadata -- the CLR runtime, the OS loaders and assembly
compilers/decompilers. These are all maintained separately, so no single one
of them has been made responsible for the metadata format, nor do they
necessarily share the same implementation. All they have to agree on is the
format, and that's what the version is used to verify.
The current format version is 1.1. It stands to reason that there was once a
version 1.0, but I don't know whether it was ever used "in the wild" and
whether the current runtimes still support it. Only when a
backwards-incompatible change to the metadata format is made would it have
to be updated (say, for example, that the metadata is extended with new
security fields that have to be understood by loaders to meaningfully
process the assembly).
The resulting assembly probably couldn't be loaded by *any* tool written
before the change (because they're presumably written to reject newer
versions as unsupported), so such a change would be rare.
--