This project is read-only.

Go To Definition fails on top-level code in Script documents


You can create a Script document to repro this by cloning & running (no longer requires Dev12), creating a .md file, and entering
var x = 2;
Pressing F12 on x will fail early because AbstractGoToDefinitionService.GetContainingTypeSymbol returns null.

Note that this is not an observable failure in that scenario because VisualStudioDocumentNavigationService refuses to navigate to my non-VisualStudioWorkspace.
This will be observable if you ever put a Script file in a VSWorkspace.


Pilchie wrote Dec 4, 2014 at 10:22 PM

This works fine for me with our internal script file syntax, and in our interactive window. AbstractGoToDefinitionService.GetContainingTypeSymbol is allowed to return null, it simply avoids the check for 3rd party navigation (i.e. to xaml files), if there is no containing type symbol.