This project is read-only.


Nov 29, 2009 at 1:38 AM


What's the reason of the "AsLatest" part of the name "RegisterAsLatest"?

It just seems to store a reference for a unit in a cache indexed by the unit's identity.

There is no concept of "latest unit" in the host and of course if you store unit references in a dictionary indexed by the identity, only the latest unit with that identity will be retained.

Every time I use or see that method I wonder if there is more than that, so... is there more than that? Why is it so important?



Nov 29, 2009 at 1:49 AM

When a host supports incremental compilation, there will be many instances of a particular assembly, all with the same identity (and thus version). When resolving a reference, the lastest instantiation should be used. RegisterAsLatest tells the host which instance is the latest.

You need not worry about the "AsLatest" part unless you are implementing something like a Visual Studio programming language editor.

Nov 29, 2009 at 2:40 AM

Ok. Then I need to worry. Thanks.