Home All Groups Group Topic Archive Search About

I have a question on EnvDTE and I got NotImplementedException

Author
14 Dec 2005 10:59 AM
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

Author
14 Dec 2005 2:02 PM
Kevin Spencer
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.

Show quote
"Laurent" <lbox2***@hotmail.com> wrote in message
news:%23FJdR1JAGHA.912@TK2MSFTNGP11.phx.gbl...
> 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
>
>
Author
14 Dec 2005 3:17 PM
Laurent
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.


"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> a écrit dans le message
de news: O96W%23bLAGHA.2***@TK2MSFTNGP09.phx.gbl...
Show quote
> 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.
>
> "Laurent" <lbox2***@hotmail.com> wrote in message
> news:%23FJdR1JAGHA.912@TK2MSFTNGP11.phx.gbl...
>> 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
>>
>>
>
>

AddThis Social Bookmark Button