Skip to content

Visual Studio Go To Definition issue with relative paths in the miscellaneous workspace #79014

@jbevain

Description

@jbevain

Version Used:
VS 17.14.5/C# Tools 4.14.0-3.25279.5+995f12b60535afe75cafbcefada9161d8dc4f31f

Steps to Reproduce:

  1. unzip ReproPathMap.zip (source only, no binaries)
  2. follow README.txt

The repro is setup so that:

  1. a Library.dll is created and PathMap is used to create relative paths in the .pdb file instead of full paths.
  2. a Client project directly references the .dll but not the Library .csproj

Following the README, doing on a Go To Definition on the code from the Library in the Client code will open the .cs file in VS in the miscellaneous workspace using the relative path from the pdb.

With a debugger attached, we can see a few exceptions being thrown when closing the file where Roslyn is not happy with the relative path.

Doing another Go To Definition shows a file without code coloration.

Expected Behavior:
Subsequent file opened by Go To Definition as code coloration.

Actual Behavior:
Exceptions are thrown upon closing the file with relative paths.
Doing another Go To Definition opens a file without code coloration.

Image

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions