0

How do I recursively include all child libraries in C#?

For instance, I want to do:

using Microsoft.AspNet.*;

And have Visual Studio automatically include Microsoft.AspNet.Identity.EntityFramework

I'm looking at code snippets from around the internet and it is not always easy to google for what objects live in which library. The AspNet library seems to be particularly guilty. I'm looking at you, "RoleManager" O.o

Balázs Édes
  • 13,452
  • 6
  • 54
  • 89
John Shedletsky
  • 7,110
  • 12
  • 38
  • 63
  • If you know the class name, you can just type it in, and VS will *usually* find the right namespace and give you an option to include it in the little pop-up. Thats about the best you'll get though. – BradleyDotNET Oct 02 '14 at 22:10
  • It would be nice to have that feature, but there is not. I almost never write using statements myself, rather I use VS or resharper to do it for me by just typing the class name. – Sriram Sakthivel Oct 02 '14 at 22:11
  • To quote from the C# 5.0 Spec: "A using-namespace-directive imports the types contained in the given namespace, but specifically does not import nested namespaces." In other words, it isn't going to happen. – BradleyDotNET Oct 02 '14 at 22:16

0 Answers0