It works when I click go to definition on the code that exists but it doesn't work if I click one in the metadata such as String, List.
Pressing ALT+F12, a blank page appears.
Pressing F12 shows:
one or more errors occurred
Visual studio often suffer from a problem of going to metadata rather than your project if you shift location where you are building the project, ie you may have several versions to test things out. Simply delete the reference and immediately add it back and everything will be sorted out. The marked solution does not always work.
As noted in comments elsewhere, the directory is v16 if you're running VS2019. Visual studio often suffer from a problem of going to metadata rather than your project if you shift location where you are building the project, ie you may have several versions to test things out.
At that point the errors disappeared but F12 took me to metadata. The issue was a dependency in the project being referenced that conflicted with a dependency in the referencing project. I manually removed dependencies from the project being referenced until one of them resolved the errors in the referencing project.
The issue was a dependency in the project being referenced that conflicted with a dependency in the referencing project. I manually removed dependencies from the project being referenced until one of them resolved the errors in the referencing project. After that I was able to F12 to the actual code, and the project would load without errors.
This is a bug being tracked at Microsoft's bug tracker as well as on the Roslyn issue tracker. It is caused by Microsoft only testing C# with space-based indentation.
The so-called "Workaround" is miserable, but still, it is to change your settings from using tabs to spaces.
There are a plethora of other issues (Namely with the C# Auto Formatter that cause tab-based work to be terrible in VS2015 until a patch comes out.
Edit:
There is now an extension available on VS Gallery, GoToDefinition Fix, which will serve well as a temporary fix for this issue.
Edit:
Visual Studio 2015 Update 1 CTP and RC variants both fix this issue, but the RC is the latest and should be installed instead of CTP if you are running it. Many formatting issues are addressed by these updates, and tabs are, basically, usable again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With