0

I don't have Resharper installed.. I want to see all subclasses inherited from IActionResult and there is no things like show derived classes in object browser and class view.

I try to install a extension TypeHierarchyViewer(https://marketplace.visualstudio.com/items?itemName=munyabe.TypeHierarchyViewer) but it is not working (even using the example List, just remains blank) .

So what should I do?

I use this function frequently developing java application using eclipse..It seems there is no out-of-box tool in VS2017 or I just missed some things??

enter image description here

(Go To Implementation says the symbol has no implementations)

enter image description here

(Same in class view)

I have searched many "solutions"(like Visual Studio: How do I show all classes inherited from a base class?) but not work or need other tools(or just see the doc?).

I want to see if there anyway to do it just using VS.

Before I thought VS was a very good IDE but I can't image it lacks so much basic functions...(so there is Resharper...)

And I find there is derived types but in Solution explorer:

enter image description here

enter image description here

But you can't input the class you want And if I input IActionResult in search box it will not find it(not in the my source and I don't implement it).

After trying..I find VS support it in solution explorer...
But it's hard to use...
I need to find some classes or interface in my source code related to the class or interface I want and use derived type and implements to find the it..
It looks like:
enter image description here
(I find a class and navigate to object, it lists all classes .Then I find ActionResult and choose implements find IActionResult, finally I can see all derived classes above... ...)

fairjm
  • 1,115
  • 12
  • 26
  • I believe the issue is that you aren't looking at the source for the projects you want to search through. The Find All References and Go To Implementation only work against the source you currently have loaded. – CPerson Nov 19 '18 at 17:43
  • https://stackoverflow.com/a/17375932/11683 – GSerg Nov 19 '18 at 17:44
  • 2
    Possible duplicate of [Visual Studio: How do I show all classes inherited from a base class?](https://stackoverflow.com/questions/282377/visual-studio-how-do-i-show-all-classes-inherited-from-a-base-class) – GSerg Nov 19 '18 at 17:46
  • @Gserg thx but no help.It works on solution view but `IActionResult` is not in. I have seen the answer it's old and the method not work(no derived in class view anymore). I want to see if I can do it without resharper and other tool out of VS. – fairjm Nov 19 '18 at 18:00
  • Maybe the problem stems from the fact that classes don't derive from interfaces; classes implement interfaces. Classes derive from other classes. – itsme86 Nov 19 '18 at 18:04
  • @itsme86 no If you use solution view you can find `derived types` right click interface and it will show your class. – fairjm Nov 19 '18 at 18:08
  • I guess I still don't understand the problem. What are you looking for that "Go to Implementation" doesn't give you? – itsme86 Nov 19 '18 at 18:13
  • Standard brain-bug, a C# class does not "derive" from an interface, it only implements one. So you need "Go To Implementation". When there are multiple then you get a list in a tool window, click on an entry in the list to navigate to the class. – Hans Passant Nov 19 '18 at 18:18
  • @itsme86 I just show there is no `show derived types` or other equivalent function in the menu and `got to implementation` not work neither. – fairjm Nov 19 '18 at 18:18
  • @HansPassant it's the same when I try to find derived classes of `ActionResult`...focus on my problem. – fairjm Nov 19 '18 at 18:20
  • What do you mean "Go to Implementation" doesn't work though? I use it frequently and I've never had an issue. – itsme86 Nov 19 '18 at 20:29
  • @itsme86 it says symbol has no implementations.See my screenshot above.I think it works for my source code but doesn't work for code in other assembly.so sad... – fairjm Nov 20 '18 at 03:39

1 Answers1

0

emmmmm
it seems there is no direct way using VS(although I can get all sub classes using solution explorer but it's too verbose...) to get the result I want.

Finally I choose to use dotpeek(I don't want to buy resharper because I just study ASP.net core not for work)
I open C:\Program Files\dotnet\sdk\NuGetFallbackFolder in dotpeek where the dependencies located.
Then using Hierarchies get the result.
enter image description here

feel a little disappointed about VS. Not so strong before I heared.
Thx for help. :)

fairjm
  • 1,115
  • 12
  • 26