0

So far the only way to browse base source code in .NET is for me to use Go To Definition from my own source code in my own project. I have to type in the name of a base class/interface/etc and use Go To Definition. But is there any way to do it directly from something like Object Browser that lists them all as included across different assemblies and namespaces. The problem is that Object Browser shows only high level descriptions and it will not get you to the actual source code.

Another question is about the individual source files. Even when VS2015 takes me to the source code, it does not call it a file, just a name of class and [from metadata]. I would like to know how the concept of individual file fits into the groups of assemblies and namespaces. What kind of a database is it built into?

Micky6789
  • 43
  • 5
  • It's not clear to me what you're talking about. If you're browsing the code in your project, surely you would do so from the Solution Explorer pane? Can you provide a specific example of something you're trying to do and how it isn't working? – David Apr 03 '17 at 14:53
  • 1
    How do you browse source files from a binary? You don't. Source files don't exist on the assembly level, except in debug symbols (which are separate from the assembly). Even those only give you the locations of methods, as far as I know, not class definitions (though I might be wrong here). There's no way for the object browser (or any other disassembler) to take you to the source as you organized it. – Jeroen Mostert Apr 03 '17 at 14:53
  • Microsoft do [open source](https://github.com/Microsoft/referencesource) most of the framework. – ProgrammingLlama Apr 03 '17 at 14:56
  • 1
    are you after [this](http://stackoverflow.com/q/8139269/1132334), so you could step into the source code of .net framework components while debugging, and hit F12 to goto definition for non-user code? (Microsoft symbol server, pdb files for framework binaries) – Cee McSharpface Apr 03 '17 at 14:57
  • I think I know what OP is talking about, I'm just not sure how to accomplish it. I've had it happen to me where, if I have a separate solution that contains a class library and include that dll as a reference to another solution's project, it will take me to the source code for the dll while debugging. – itsme86 Apr 03 '17 at 14:57
  • Nobody says that you use assembly files to get source code. You use a tool called Object Browser. It uses assembly files and anything ***else*** that should be useful, and clearly source code is very useful. If a tool called Go To Definition has access to base source code, then another tool called Object Browser should have the same access. The big question is what is the database where base source code is maintained, and how the individual source code files are built into it. – Micky6789 Apr 03 '17 at 15:00
  • It's inside Visual Studio, from the solution, and by extension all projects in the solution, and by extension all files referenced from the projects. If you want to know how to write Visual Studio extensions that use that at runtime, that's another matter altogether. Of course Object Browser has access to the source organization of the currently open solution, since it's running as part of VS -- and at the same time, it's simply not written to use it since that's not its purpose. If you think that's an oversight, open an issue on Connect. – Jeroen Mostert Apr 03 '17 at 16:12

0 Answers0