vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

"Go to definition", visual studio code says "No definition found"

Open iantierney opened this issue 1 year ago • 2 comments

Using the Unity Unity v1.0.1 with VS code for mac Version: OSX 14.3 I have the extension "intellicode for C# dev kit" and the "C# dev kit" extensions installed.

Environment data

dotnet --info output: VS Code version:1.88.1. for mac C# Extension version: 2.23.15

OmniSharp log

Steps to reproduce

right click a function call from another class, and select "Go to definition", visual studio code says "No definition found" for that function even though the function definition is in the project.

Expected behavior

Should open the function

Actual behavior

says "No definition found"

Additional context

Tried: Generating a new workspace Restarting OmniSharp

iantierney avatar May 02 '24 15:05 iantierney

@iantierney a couple of items. what you're seeing is generally a sign that the project isn't loaded.

First, make sure to follow these instructions for using Unity with VSCode - https://code.visualstudio.com/docs/other/unity

Once you've done that, if you're still having issues I may need more information to help.

  1. Can you make sure you have a solution opened? You should see a solution explorer window populated with your projects if you have it opened image
  2. If the solution explorer is empty / not showing up, we'll need logs to figure out what is going on a. Set the dotnet.server.trace setting in vscode to Trace, and reload the window. b. Attach the 'C#' output window logs, the 'Projects' output window logs, and the 'C# Dev Kit' output window logs.

dibarbet avatar May 07 '24 21:05 dibarbet

@dibarbet VS code show: Activating the "Microsoft.VisualStudio.CpsProjectIconSourceService (0.1)" service failed.

lcd11001 avatar May 23 '24 09:05 lcd11001

Should be duplicate of https://github.com/microsoft/vscode-dotnettools/issues/840 and fixed in the latest versions of C# devkit.

dibarbet avatar Jul 23 '24 00:07 dibarbet