In Visual Studio 2008, is there an easy way to determine which DLL defines a class?

Simply define the namespace for the class by clicking Go to Definition (or by hanging), but I often need to know which dll is defined, so I can add the appropriate link to another project that requires the same thing).

For example, in Silverlight, there are many classes in the System.Windows.Controls namespace, and they extend to at least 5 different DLLs.

In the end, I will find out through the trial version and the error, but there should be an easier way.

Thanks in advance.

+4
source share
3 answers

If the class DLL is a project in your solution, you can enable the Track Active Item in Solution Explorer option (in the "Tools"> "Options"> "Projects and Solutions" section), so when you go to the "in class" definition, select in the solution explorer will automatically move to the file, then you can see in which project it is located.

+1
source

If your namespaces are well-named (so that they refer to the dll name), then you should have no problem. Perhaps you should consider a few minutes of refactoring your namespaces?

If you go to the definition of ', then you can use save - to easily see where it is saved in the project (and then cancel the save). (This, of course, depends on the structure of your folder related to your name names and assembly names, but usually getting the file name is enough to develop a project to which something belongs)

edit: (of course, this only works for classes for which you have source code)

0
source

Unfortunately, I think there is no easy way to do this. I feel your pain because I had the same problems in the past.

My usual approach to solving this problem is a reflector. For every solution that I have, I usually have a reflector configuration that contains the whole DLL or refers to that solution. When I need to find out that I have a DLL, I open the reflector, do a quick name lookup and discover the DLL.

This is not an ideal solution, but it works relatively quickly.

0
source

Source: https://habr.com/ru/post/1299824/


All Articles