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 in mixed C# and C++/CLI project does not go to source #52806

Closed
vsfeedback opened this issue Apr 21, 2021 · 6 comments
Closed
Labels
Milestone

Comments

@vsfeedback
Copy link

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


I have a solution which contains

  • a C# project (console app)
  • a C++/CLI dll

When I ctrl-click an item imported from the C++ project in C# I am taken to the decompiled source from metadata, not the actual source. Debugging into the source works fine, as well as intellisense. It is just the "go to definition" that is not working.

Is there some recommended setup to get the code navigation to work or is it simply not supported?

Thanks


Original Comments

Feedback Bot on 3/12/2020, 02:25 AM:

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.

Sara Liu [MSFT] on 3/17/2020, 11:38 PM:

Thank you for your feedback and taking the time to reach out to us.
According to your description, I tried to test it and got the same result as yours. This issue has been escalated for further investigation, if there is any process, I will inform you immediately.


Original Solutions

Vatsan Madhavan [MSFT] solved on 3/31/2020, 10:45 AM, 1 votes:

This affects a couple of .NET Framework assemblies (PresentationCore.dll, System.Printing.dll for e.g.) and .NET Core assemblies (DirectWriteForwarder.dll, System.Printing.dll).

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 21, 2021
@CyrusNajmabadi
Copy link
Member

Is there some recommended setup to get the code navigation to work or is it simply not supported?

This can be supported if C++ plugs into the roslyn mechanism for allowing 'third party navigation'. I'm looking for someone on C++ to pull into the discussion to see if they want to add support for this.

@CyrusNajmabadi
Copy link
Member

Tagging @jasonb01 on this. We defer to IVsSymbolicNavigationNotify for this sort of thing. So when we're about to navigate, we call QueryNavigateToSymbol. If some party in VS (lke C++) says: "yup, that can navigate to this file/line" then we defer to that.

So it's mostly up to you guys if you want to add support for this.

Note that currently this is a COM/non-cancellable call. So it's pretty hard to do well as the receiver has to be able to very quickly determine if it can navigate to the symbol without blocking the UI indefinitely. I would def prefer we move to at least a cancellable form, as well as a non-STA approach if possible here.

@jinujoseph jinujoseph added Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-Navigation Navigation and search and removed untriaged Issues and PRs which have not yet been triaged by a lead help wanted The issue is "up for grabs" - add a comment if you are interested in working on it labels Apr 28, 2021
@jinujoseph jinujoseph added this to the Backlog milestone Apr 28, 2021
@CyrusNajmabadi
Copy link
Member

Closing out as this is on C++ to support.

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
@emmenlau
Copy link

Dear @CyrusNajmabadi where would this issue need to be raised, to be better fitting?

@CyrusNajmabadi
Copy link
Member

I would file it using visual studio. It will go to developercommunity and get routed properly.

@emmenlau
Copy link

Thanks @CyrusNajmabadi , could you help me there? I filed the issue in the Visual Studio DeveloperCommunity at https://developercommunity.visualstudio.com/t/Intellisense-does-not-navigate-from-C-t/10878849, but they actually pointed me here, saying that the issue is already listed here. But I understand that this here is an off-topic issue, and they should redirect it elsewhere - how can we tell them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants