C
C#17mo ago
Moaml

❔ VSCode shows type definition and not the actually implementation

When I press F12 or use the Go To Definition option, it only shows me the definition without any implementation. Similarly, when I click on Go To Implementation, it doesn't work either, it shows me No Implementation Found For BlaBla I use : - Vscode latest version - C# dev kit extension ( with C# extension Pre-Release version) - Dotnet 8 preview - Everything is work fine (autocomplete, intellicode ..)
14 Replies
Philémon
Philémon17mo ago
Hello, Can you show us the implementation method and the definition method ? Or did you check, to be sure, that your implementation class does implement the interface and that you wrote the implementation methods ? I know it maybe won't help, but i also know i made that mistake previously, so i answer this, to be sure 😁
Angius
Angius17mo ago
Are you doing it on some library's code? Or on your own code? If the former, I'm afraid VS Code isn't smart enough to decompile the DLL and show you the actual code
333fred
333fred17mo ago
Do you have this setting enabled?
333fred
333fred17mo ago
No Now, what is possible is that you're trying to go-to-def on a method that is defined in a reference assembly
Moaml
MoamlOP17mo ago
No, I'm sure about library's code It's work fine on my own code tho Yes, I did Actually, it works on my own code (go to def will take me to the method I clicked on and ofc with the implementation), I was using the C# ext "release version" it was working fine but when I upgraded it to the "pre-release version" it ain't work anymore "show me the definition of the method (without the implementation)"
333fred
333fred17mo ago
Hmm. In that case, please do report a bug through vscode
Moaml
MoamlOP17mo ago
I was thinking about it, but I thought I could miss something
Moaml
MoamlOP17mo ago
public class User : DeletableEntity<UserId>
{
// code here
}
public class User : DeletableEntity<UserId>
{
// code here
}
Go To Def on DeleteableEntity class which is class from external library it show me the code in "screenshot'
333fred
333fred17mo ago
What's at the top of the file
Moaml
MoamlOP17mo ago
#region Assembly LibarayNameHere, Version=4.0, Culture=neutral, PublicKeyToken=null
// /home/user/.nuget/packages/LibarayNameHere/4.0/lib/net6.0/LibarayNameHere.dll
#endregion
#region Assembly LibarayNameHere, Version=4.0, Culture=neutral, PublicKeyToken=null
// /home/user/.nuget/packages/LibarayNameHere/4.0/lib/net6.0/LibarayNameHere.dll
#endregion
333fred
333fred17mo ago
Yeah, ok, that doesn't look right. Please file a bug
Moaml
MoamlOP17mo ago
What about these settings ?
Moaml
MoamlOP17mo ago
I disabled both ot these options, and its still work as here
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server