“Go To Definition” in Visual Studio only brings up the Metadata for Non-Project references

后端 未结 7 1151
温柔的废话
温柔的废话 2020-12-03 11:00

I have a C# project which contains references to assemblies in DLL format. I have the PDB information for these DLL files, contained in the same folder. When I press F12 o

相关标签:
7条回答
  • 2020-12-03 11:24

    Add the reference as a project instead of ..\bin\Debug\referenceFile.dll

    That solved my issue

    0 讨论(0)
  • 2020-12-03 11:27

    If you have ReSharper installed, you should bring up ReSharper options, and look for External Sources. There you can specify the relevant options:

    enter image description here

    0 讨论(0)
  • 2020-12-03 11:29

    I also used add reference as a project and my problem has been resolved and it's working great. Actually I was stuck at this point from very long time and finally i resolved this issue.

    References -> Add References -> Solution -> Projects -> Select reference

    0 讨论(0)
  • 2020-12-03 11:31

    One solution to this issue is to use .NET Reflector, VS or VSPro edition. This program will modify Visual Studio to provide the required functionality.

    http://www.reflector.net/

    Unfortunately, it costs $135 to $195, which isn't an option for everybody.

    0 讨论(0)
  • 2020-12-03 11:32

    In Visual Studio expand the References section, select the reference to your related project (the one that contains the source code you want to F12 into) right click on it and select "Remove".

    Then add the reference back to the project by right clicking on References and selecting Add Reference, under the Projects tab (if your using VS 2012) select (or browse for) the project you want to add a reference to and then click the OK button.

    This will rebuild the reference and you will be able to F12 into the referenced projects source code. You will need to do this with all the projects in your solutions that are having this issue.

    I don't know why this happens but at least the solution to the problem is rather simple

    0 讨论(0)
  • 2020-12-03 11:36

    Is the referenced DLL a project in your solution? I find that when I have the source code for the project, and it's in my solution, Visual Studio is able to link to this code much more easily. (without showing me meta data).

    Also, be sure to add the reference by "Project" in the References popup.

    This is generally what I do anyways when I have this problem

    Hope this helps!

    PS. PDB files are usually just for debugging (both locally and remote) and are not used for source code reading in the way you are attempting to use it. ("Go To Definition")

    0 讨论(0)
提交回复
热议问题