How can I access the currently opened project's types(classes) from a Visual Studio add-in(be able to create instances of those classes within the add-in)? Is this possible through reflection? Or maybe dynamically include the project's assembly as a reference?
What I'd like to have in the end is a list of all types accessible from the project, taking into account referenced assemblies and types declared in the project itself. In absence of a method to actually find Type instances, a list of type names may do - this way, I won't run into problems if the project is not yet built and the types therein are not yet implemented.
I use Visual Studio 2008 and the language I prefer is C#.
Edit: I imagine I could parse each file and seek out class declarations, but I'd like to consider types from referenced assemblies as well. The references may be sought after by searching for "using" statements, but that leaves dynamically imported dll types an open issue. Thus, given the branching of separate situations to consider, I'm wondering if there isn't an easier way.