I have a question on EnvDTE and I got NotImplementedException

  • Thread starter Thread starter Laurent
  • Start date Start date
L

Laurent

Hi

I want to retrieve all the class defined in all project from the active
solution. I can get the projects, the files, references ... but I can't get
the content of the Class View.

During my tests, I get a NotImplementedException when I try to access the
EnvDTE.CodeElement.Children

From the exception.stackTrace:

at EnvDTE.CodeElement.get_Children()
......



Laurent
 
That exception occurs when a method has been stubbed out, but not
implemented. In other words, the method doesn't really exist yet, but it
looks like they plan to create it at some point.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
I finally succeed in retrieving the classes contained in the project.
The exception seems to occur when CodeElement.IsCodeType returns false.
Testing this flag first allows to correctly recurse le objects tree.
Like these objects are COM wrapper, maybe the NotImplementedInterface means
E_NO_INTERFACE because the call is simply not valid.
I do not have time to do more test.
 
Back
Top