Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find what reference file a namespace in a using directive is coming from?

Tags:

namespaces

c#

I have some older software that I am maintaining. I am attempting to find out what specific reference file contains the namespace that is being brought into the project by the using directive.

Is there a simple way of finding which reference file contains the namespace of a given using directive? This seems like it should be easy, and it probably is, but all of my searching using these terms returns results related to how to implement using directives and reference classes, etc. However, I cannot find an answer for how to find the reference containing the namespace in question.

For some reason, the references often contain namespaces that have nothing to do with the name of the file. For example, I've seen references like Foo.cs that contain the namespace Bar. I then see

using Bar;

and can't find an easy way to see what reference file contains the namespace.

Anyway, apologies in advance if this is something stupidly simple that I'm just not finding.

like image 695
Trevallion Avatar asked Nov 01 '22 01:11

Trevallion


1 Answers

Object Explorer? It will show the assembly name – Fals

I was able to find the namespace under the type in the object explorer, thank you. Even as a relative beginner, this is something I should have known to try, so thank you for taking the time to point me in the right direction.

like image 159
Trevallion Avatar answered Nov 17 '22 03:11

Trevallion