21

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

enter image description here

rudolf_franek
  • 1,795
  • 3
  • 28
  • 41
fish_tree
  • 401
  • 3
  • 11

1 Answers1

24

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.

Zoey
  • 2,391
  • 2
  • 22
  • 28
  • 3
    OMG! How embarrassing for MS! Just checked, that the source code can contain tabs instead of spaces, just flip a relevant checkbox in the Tools\Options for a moment and the F12 works straight after that. – Alex Klaus Aug 10 '15 at 01:56
  • 2
    see https://github.com/dotnet/roslyn/issues/4019 for the issue on github. and https://visualstudiogallery.msdn.microsoft.com/7c807aa8-40a4-4c75-9c46-e0ba8b34a367 for a workaround using an extension – Rutger Sep 07 '15 at 07:35
  • Microsoft clams that they fixed it with [VS 2015 CTP 1](http://blogs.msdn.com/b/visualstudio/archive/2015/10/08/visual-studio-2015-update-1-ctp.aspx) – Jurijs Kovzels Oct 09 '15 at 12:27
  • It is, in fact, fixed. However, there appear to be some oddities with intellisense and lambdas in said preview. – Zoey Oct 10 '15 at 23:35
  • 2
    Lol this issue IS STILL LIVE at VS2017 Official Release wtf. (Even after a VS restart lol) – AgentFire Jun 15 '17 at 20:10
  • @AgentFire: Having a ball with this over at [DeveloperCommunity](https://developercommunity.visualstudio.com/content/problem/181887/unable-to-see-definitions-in-newloaded-c-projects.html). :P – Laurie Stearn Jan 13 '18 at 05:24