Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to definition opens metadata instead of source file for project reference #75480

Open
vsfeedback opened this issue Oct 10, 2024 · 0 comments
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
I’m using VS2022 (17.11.4).
Project 1 is .NET 8 API C# project which references another project in the same solution, but this is a .Net standard VB.NET project. When I click F12 in the API project on a function of the .Net standard project, the first time it opens the source file and show the function. When I close the source file and click again F12 on the same function then it opens a metadata file instead of the source file.

I have done the following acctions which didn’t solve the issue:

  • removed and readded the project reference
  • deleted the hidden .vs folder

Original Comments

Feedback Bot on 9/19/2024, 09:07 PM:

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.

Mark Dell on 9/25/2024, 07:26 PM:

I have this same issue with .NET Framework 4.8 projects. This only seems to occur for me trying to go to the definition in a VB project from a C# project, but not from VB to VB. I find that it is sporatic as to whether it will open the actual source file or the metadata, but in many cases, it rarely, or sometimes never, opens the actual source file.
Sometimes removing and readding the project reference seems to fix the issue, but this only seems to be temporary, and this typically does not change the project files in any way. I have also tried deleting the .VS folder, but it does not help.
Also note that I experienced this in version 17.10.4, which is why I updated to the latest. Testing it there I found that it has the same bad behaviour.

Interestingly, ALT-F12 often seems to work correctly, even when F12 never does, although I cannot say that it does so 100% of the time. I am not sure why it works better, but it certainly is less intuitive to use.
Update: In a recent project I was working on Alt-F12 failed to work, just like F12. It seems to be sporatic as to what will make it work correctly. I even tried rebooting, but that did not seem to completely eliminate the bad behaviour.

Mark Dell on 10/10/2024, 11:19 AM:

Note that while Filip Masset has designated the this as [severity:It bothers me. A fix would be nice], I would put this at [severity:It’s more difficult to complete my work].

Feedback Bot on 10/10/2024, 11:24 AM:

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#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.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant