vscode-csharp
vscode-csharp copied to clipboard
"Go to definition", visual studio code says "No definition found"
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 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.
- 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
- 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.tracesetting in vscode toTrace, 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 VS code show: Activating the "Microsoft.VisualStudio.CpsProjectIconSourceService (0.1)" service failed.
Should be duplicate of https://github.com/microsoft/vscode-dotnettools/issues/840 and fixed in the latest versions of C# devkit.