Hi Kenneth,
getting a System.Type means loading the assembly containing the type. In an
add-in you can iterate over all references of the project and load the
according assemblies. But the assemblies remain loaded as long as VS is
open. If one of the assemblies is a assembly of the same solution, the next
build would fail.
I think, the only way to get the information you wish is to launch an
external application (or a new app domain), which loads all referenced
assemblies and determines the information you wish to have. Collect the
names of the types you wish information for, write them in an input file,
launch the application. In the external app load the assemblies, get the
types and write the wished information in an output file. After returning
from the launched application your add-in reads the output file and uses the
information.
Regards,
Mirko
>I am writing a code generator in which I need get various information about
>pre-existing types referenced in the current code body. As long as the
[quoted text clipped - 4 lines]
>the code model classes. Is there a way, starting from a CodeTypeRef ( on
>returned by CodeFunction.Type for example ) to get to a System.Type?