Repository navigation
[VS] Go To Definition into C#/VB projects of the solution, F12 picks the overload - #2170
Merged
RobertvanderHulst merged 7 commits intoNov 11, 2026
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…header Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Go To Definition (F12), Peek Definition (Alt+F12) and Go To Base (Alt+Home) on a type or member that comes from a C# or VB project of the same solution now open the real source file at the declaration, the way C# does for project references. Until now X# only knew such symbols from the project's output DLL and showed a generated, read-only X# header.
Compilationcomes from VS's own Roslyn workspace (VisualStudioWorkspacevia MEF), and the symbol is found by its XML doc ID, which the code model already builds for the documentation lookup.Outer/Inner) are handled.OverloadFilteras Find All References and Go To Implementation. When the arguments do not decide, the "X# Goto Definition Results" list appears as before. This applies to X# methods as well.XProject.ProjectOutputs(code model) exposes the stored project → output DLL map.Microsoft.VisualStudio.LanguageServicescompile-only (ExcludeAssets="runtime"): 4.8.0 for VS 2022, 3.9.0 for VS 2019. At runtime VS's own Roslyn is used; the VSIX contains no Roslyn assembly (checked for the 2022 VSIX).Notes
[15.0,17.0); Roslyn 3.9 needs VS 16.9. Below that F12 keeps showing the header (no error).Test plan
LanguageService.Tests: 538/538 pass (26 new: resolver against real Roslyn compilations incl. partial, nested, generic fallback, implicit constructor, generated files, multi-target dedupe; DLL → project mapping; overload pick)net48;net8.0) and a VB project: F12 on class, constructor call, property, nested class, interface, enum, generic method, overloads, partial class (list), VB class and method; Peek on a property; Go To Base from an X# class to its C# base; renamed-but-not-built member lands on its type;System.Text.StringBuilderstill opens the generated header🤖 Generated with Claude Code