Roslyn: VS2019, C# : Cannot peek inside an active peek unless the current peek target is already opened as a proper file (applies only to non-std peek target symbols)

Created on 11 Jun 2019  路  9Comments  路  Source: dotnet/roslyn

VSF_TYPE_MARKDOWNSteps:

  1. Have different files with different custom types and methods.
  2. Close them all except one that uses types/methods from other files.
  3. Peek into any such custom type or method definition.
  4. Inside that peek window, only symbols from the standard library and symbols local to the target file (of the peek) are properly highlighted and you can peek at them.
  5. If you open the file of the target of (3), the peek window in (4) should have the proper highlighting and you can peek at them properly.

_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/482007/vs2019-c-cannot-peek-inside-an-active-peek-unless.html
VSTS ticketId: 814177_
_These are the original issue comments:_

Visual Studio Feedback System on 3/7/2019, 08:11 PM (95 days ago):

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Visual Studio Feedback System on 3/8/2019, 00:55 AM (94 days ago):

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.

Sara Shi [MSFT] on 3/12/2019, 02:47 AM (90 days ago):

Thank you for your feedback! I tried to repro the issue,


  1. Create a console app, add Box.cs
  2. add reference of Box.cs in Program.cs
  3. set caret at Box, invoke 'peek Definition'
  4. inside the peek window, set caret at symbols ,invoke 'peek definition'

  5. open Box.cs, we can invoke peek window.

Could you confirm if my steps are correct and what do you mean of step 4,5? Could you provide some more detailed description or screenshots follow the attached project consoleappc.zip to help us better understand this scenario?

We look forward to hearing from you!

Muhammad Nael [MSFT] on 3/12/2019, 06:22 AM (90 days ago):

Hi!

I modified the project and included it with 2 screenshots. If Thing in Box were a symbol from the .NET 'standard library' (I don't know what else to call it), it wouldn't have the same issue. The issue shows in the Box.cs-closed screenshot.

* Box.cs is not open. Thing is not highlighted and cannot be peeked into.

* Box.cs is open and Thing is properly highlighted and reachable by peek in the peek into Box.cs from Program.cs.

Visual Studio Feedback System on 3/12/2019, 09:35 PM (89 days ago):

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.

Visual Studio Feedback System on 4/10/2019, 03:03 AM (61 days ago):

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq . In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/ . We'll keep you posted on any updates to this feedback.

Leon(Work) Yang on 6/4/2019, 01:35 PM (6 days ago): (private comment)

similar issue with Mouse Click got to definition, the peek view is not recursive , I guess it's same root cause.

mouseclickgotodefinition.png

_These are the original issue solutions:_
(no solutions)

Area-IDE Bug Developer Community

All 9 comments

This is a regression it works fine in Visual Studio 2017, I should add that if you peek a definition and then try to do a "Go to definition" it throws a message windows saying "Cannot navigate to the symbol under the caret.

This is so frustrating, I'll have to o back to VS2017...

This is a regression it works fine in Visual Studio 2017, I should add that if you peek a definition and then try to do a "Go to definition" it throws a message windows saying "Cannot navigate to the symbol under the caret.
This is so frustrating, I'll have to o back to VS2017...

I'm almost going back to VS2017 too. Would be great to have this issue fixed soon...

Not certain yet, but it seems to be working again after updating to 16.3.0 Preview 1.0 (I was updating from 16.1.0 Preview 3.0, IIRC).

@narfanar I have updated to 16.1.6 and still have the problem. Latest release version at this time is 16.2.1 but I didn't have the time to update it yet and see what happens.

Seems fixed in 16.3.0 Preview 2.0. Highlighting works for types from other assemblies, even when they are not open in another editor window. Can anybody confirm?

Visual Studio 2019 16.2.3 and the problem still persists. And it's not only than you cannot peek inside a peek (even if the file is open in my case) but you can't either "Go to Definition"...

Visual Studio 2019 16.2.3, confirming problem still exists, Peek and Go to Definition both return the error: "Cannot navigate to the symbol under the caret." if the file is not already open.

Wait till 16.3.x+ (any Previews) is available to you. Should be fixed there.

I have verified on the latest build 16.4.0 Preview 2.0 [29315.20.master] that this is fixed.

Was this page helpful?
0 / 5 - 0 ratings