0

Is possible in Visual Studio (2012) to find all classes (or others sources) which depends from a given referenced assembly at design time ? How ?

Suppose, you think an assembly can be removed and a little refactoring or change could supply its absence, so you could just remove the assembly and try to work on the compiler errors. But if we need only analyse the impacts from removing some individual assemblies, or just to know which sources files depend on it, this work isn't better approached capturing compiler errors from each scenario removing and re-adding each assembly. So, is in Visual Studio a way to see that like others dependencies analyse already supported ?

Luciano
  • 2,695
  • 6
  • 38
  • 53

1 Answers1

0

Ya it's possible...by using GetTypes() method, you access any class and form in dll. look this link: system.reflection.assembly.gettypes()

Fuad
  • 231
  • 2
  • 10
  • I'm not asking about .Net API, but from Visual Studio IDE. Today if we remove the assembly we can get all types which references its contents by compiler errors, but how to get a similar result without disturbing the project ? Like showing it in Code Map ? – Luciano May 16 '13 at 18:11
  • I dun think you can do and get to this goal without programmming.anyway,if you want ,this method __AssemblyName[] Names = SampleAssembly.GetReferencedAssemblies();__ shows you the same what you want.for any dlls – Fuad May 16 '13 at 18:53
  • I already know very well the Reflection API, I'm just searching for Visual Studio resources (at design time), like Code Map. Even third-party extensions, like Resharper, CodeRush, and so on. – Luciano May 16 '13 at 19:17
  • I improved the question, clarifying what I'm asking. – Luciano May 16 '13 at 19:33
  • :D This is cool..look : http://msdn.microsoft.com/en-us/library/vstudio/dd409453.aspx – Fuad May 16 '13 at 19:44
  • and this : http://stackoverflow.com/questions/15109753/visual-studio-2012-find-circular-references-efficiently . but in my idea the first link above is better – Fuad May 16 '13 at 19:58
  • 1
    Maybe Code Map could do it, but "how" is the question. Given an assembly and showing all sources (classes would be useful) that can crash if it is removed, doesn't work just clicking on assembly and adding it to a diagram. I guess if Code Map can do it, ins't so simple as I tried, maybe need a workaround in the way it is used like adding all classes first, but isn't anyway a good approach for big, very big projects (thousands classes). – Luciano May 16 '13 at 21:26
  • On Code Map Diagram ...you may face another issue that this kind of diagram never shows the dlls related in other dlls used in code. U know...Luciano...ya after adding dll you have to work on it anyway .this tool in VS has given you anythings. you can also do this goal and have all dll's references next to your solution's diagram by dragging an assembly and dropping it on your solution's diagram from FileExplorer. – Fuad May 17 '13 at 12:53