dotnet / dotnet/roslyn

'Go to definition' on a partial method definition incorrectly takes to its partial implementation

Open
#82,889 3 comments 0 reactions 0 assignees View on GitHub
Area-IDE
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

**Version Used**:
VS 2026 Insiders [11612.153]

**Steps to Reproduce**:
```cs
public partial class MyClass
{
public partial int GetValue(); // 1
}

public partial class MyClass
{
public partial int GetValue() // 2
{
return 0;
}
}
```
- Go to implementation at `// 1` - takes you to `// 2` - correct ✅
- Go to definition at `// 2` - takes you to `// 1` - correct ✅
- Go to implementation at `// 2` - takes you to `// 2` (itself) - correct ✅
- Go to definition at `// 1` - suddenly takes you to `// 2` - incorrect ❌, should take you to `// 1` (itself)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the four navigation cases in the issue's partial C# class example using VS 2026 Insiders, then trace the Go to definition behavior for the declaration at // 1. Done means that navigation from // 1 stays at // 1 while the other listed definition and implementation results remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.