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 on external package only works as expected the very first time #74220

Open
vsfeedback opened this issue Jul 1, 2024 · 1 comment
Assignees
Labels

Comments

@vsfeedback
Copy link

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


[severity:It's more difficult to complete my work]
In a C# project I have a PackageReference to Vanara.PInvoke.User32, and in the code a call to a method from it, something akin to the following.

Vanara.PInvoke.User32.SendMessage(new HWND(), uint.MaxValue, IntPtr.Zero, "");

Performing "Go To Definition" action on it in a .NET Framework project for the very first time for a specific version of the package (f.e. 4.0.1) brings me to the definition of the method in the User32 class, as expected.
Any subsequent time, from different projects, as long as it's .NET Framework and the same package version, gets me to TvOut.cs [embedded] where public static partial class User32 is defined. Trying to go to the method I want via the navigation bar results in a The definition of the object is hidden. error message.

This is exceptionally frustrating.

Interestingly, this works just fine for .NET8 projects every time.


Original Comments

Feedback Bot on 5/22/2024, 08:31 PM:

(private comment, text removed)

Wenwen Fan [MSFT] on 5/22/2024, 10:17 PM:

(private comment, text removed)

Timur Kelman on 5/23/2024, 04:34 AM:

(private comment, text removed)

Wenwen Fan [MSFT] on 6/3/2024, 05:01 AM:

(private comment, text removed)

Wenwen Fan [MSFT] on 5/30/2024, 01:29 AM:

(private comment, text removed)

Timur Kelman on 6/3/2024, 02:27 AM:

(private comment, text removed)

Wenwen Fan [MSFT] on 6/3/2024, 04:24 AM:

(private comment, text removed)

Timur Kelman on 6/3/2024, 04:35 AM:

(private comment, text removed)

Timur Kelman on 6/3/2024, 05:03 AM:

(private comment, text removed)

Wenwen Fan [MSFT] on 6/27/2024, 01:23 AM:

(private comment, text removed)

Wenwen Fan [MSFT] on 6/27/2024, 01:24 AM:

(private comment, text removed)

Timur Kelman on 6/27/2024, 02:35 AM:

(private comment, text removed)

Feedback Bot on 6/27/2024, 03:22 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 1, 2024
@Cosifne Cosifne removed the untriaged Issues and PRs which have not yet been triaged by a lead label Jul 1, 2024
@TymurGubayev
Copy link

workaround: uncheck Tools>Options>Text Editor>C#>Advanced>Enable navigation to Source Link and Embedded sources, leave Enable navigation to decompiled sources checked.

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