Do "Go to Definition" go to the original .NET source

Resharper has the ability to go to sources from symbol files. If I enable the download, navigation works - I can go to Console.Writeline code and so on.

However, I already downloaded the entire source source - is there a way to redirect Resharper to this source, so it does not load unnecessarily?

I configured the source of the link in accordance with the instructions on the site

+4
source share
2 answers

This is currently not possible. Vote / watch http://youtrack.jetbrains.net/issue/RSRP-126489

+2
source

I managed to get this to work with RTM for Visual Studio 2015 and ReSharper v9.1.3 (and Visual Studio 2013 ). This is what I did ...

NOTE: This is bizarre. I'm not sure why, but sometimes the downloaded characters contain information about the source code, and sometimes not. I had to delete characters from my cache many times and try to get the appropriate ones by connecting the debugger to applications / websites and go to Tools-> Options-> Debugging-> Symbols and clicking Download all symbols , I also took several steps to the initial step, and I had to copy PDB files from my Symbol cache to a directory in the GAC and in C:\Program Files (x86)\Reference Assemblies . Finally, I went over to the properties of the Visual Studio project and added F:\dd to the Reference Paths list. Now I can right-click Go to sources for most classes.

Short version:

  • You should use http://referencesource.microsoft.com/symbols as your symbol server instead of the standard Microsoft Symbol Server
  • Symbols expect to find the source source files in F:\dd .
  • Delete all cached characters so that they retrieve them from the newly added character server.

Long version:

Debugging options panel-> characters>.> </a> </p> <ol start = Delete all your cached characters! In the PDB in your cache there is no information about the source code files. Visual Studio may have blocked some of them, so you will have to close it first.

archived Link Source for the version of the .NET Framework you are working with.

Here is the hard part. The downloaded zip file contains a folder called Source . Character files will expect the folder to be F:\dd . You can open one of the PDBs extracted from the new character server that you added to see what I mean:

If you have a F: \ drive, simply: unzip the Source folder from the zip file to F: \ and rename it to dd , and you should be fine.

If you do not have a F: \ drive, you create a F: \ partition or load a virtual disk. I used a mapped network drive by extracting the Source folder to the C:\Code shared folder.

Then I mapped the network drive to \\MYPC\Code :

I did not want to rename the folder to dd , so I named it ReferenceSource and created a directory junction using the Command line (should be run as Administrator):

 cd C:\Code mklink /j dd C:\Code\ReferenceSource 

Voila. Now I have a F:\ drive mapped to C:\Code and a dd transition that points to C:\Code\ReferenceSource .

+1
source

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


All Articles