I think I see why I'm confused. I followed one of the VSIP MPF examples,
which created a new project by inheriting from the ProjectNode class. Since
that's what I have registered as my project type, that's what I get from
Project.Object. ProjectNode does not implement the VSProject interface, so
no References property.
It seems like I've missed a step somewhere, based on the code sample I used
as a template. My version of the documentation is blank under the section
"How to: Create a Project Using the MPF Classes". Is there something
different I should be doing to make a new project type? Thanks.
>I think I see why I'm confused. I followed one of the VSIP MPF examples,
>which created a new project by inheriting from the ProjectNode class.
>Since
>that's what I have registered as my project type, that's what I get from
>Project.Object. ProjectNode does not implement the VSProject interface, so
>no References property.
I'm sorry, it's me who got you confused here. I was looking at the wrong
kind of documentation for your purpose. Implementing the project type by
deriving from ProjectNode is the correct thing to do and in that case
there are three interfaces IVsProject, IVsProject2 and IVsProject3, none
of which allow access to the references.
I've been looking around a bit more, but I'm sorry to say I haven't found
a final solution to your problem. One approach I looked at was to use the
node hierarchy to find the nodes for the references - that's how the MPF
classes do it themselves in places. For example, you can find the node
that contains the reference nodes like this:
ReferenceContainerNode node = ProjectMgr.FindChild("References") as ReferenceContainerNode
But I wasn't able to find a reliable way to access the child nodes of a
given node - the node list seems to be implemented as a linked list, but
without any kind of abstraction, it's dealt with in various utility
methods of the HierarchyNode class.
The other thing I found is that the ProjectNode has an internal Hashtable
field called libraryList, which stores all the referenced assemblies - but
it's private and you could get only the assemblies names from it, none of
the options that usually go with a complete reference.
I hope someone else will be able to shed some light on this, I'm sure
we're missing something obvious here :-) Or maybe part of the problem is
that I'm only using the beta 2 drop, there are a few newer drops
available...
>It seems like I've missed a step somewhere, based on the code sample I used
>as a template. My version of the documentation is blank under the section
>"How to: Create a Project Using the MPF Classes". Is there something
>different I should be doing to make a new project type? Thanks.
You should probably install a documentation update, the docs I have show a
lot of descriptional text for that topic.
Oliver Sturm

Signature
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)