dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.96k stars 4.02k forks source link

Cannot navigate to certain symbols within Microsoft.VisualBasic.dll #16002

Open davkean opened 7 years ago

davkean commented 7 years ago

Tried to isolate this repro, but couldn't. However, I can repro consistently in our solution.

  1. Clone at this commit: https://github.com/davkean/roslyn-project-system/commit/f19967712d698a1a56ef1c61d31c09e556d4f63f
  2. From a VS command prompt, run build.cmd from the root
  3. Open src\ProjectSystem.sln (I picked yesterday's build of Roslyn - 12/18)
  4. Open src\Microsoft.VisualStudio.AppDesigner\Common\switches.vb
  5. Navigate to line 420 in src\Microsoft.VisualStudio.AppDesigner\Common\switches.vb:
    Dim ts As TimeSpan = Microsoft.VisualBasic.Now.Subtract(s_timeCodeStart)
  6. Right-click on Now and choose Go To Definition

Expected: To go to the definition Actual:

---------------------------
Microsoft Visual Studio
---------------------------
Cannot navigate to the symbol under the caret.
---------------------------
OK   
---------------------------
Pilchie commented 7 years ago

I suspect this is because we embed the runtime, and the symbol doesn't actually come from MS.VB.dll in this case?

davkean commented 7 years ago

No, embed runtime is turned off:

.assembly extern Microsoft.VisualBasic
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )                         // .?_....:
  .ver 10:0:0:0
}