Go to definition when opening a solution

Hi, I’m opening a solution .sln file from Visual Studio, using the extension “Open in Visual Studio Code”. With this, I cannot go to definitions, since this command in not displayed in the right-click menu. But when opening single files with the same extensions, the command on the right-click menu is visible (and doesn’t work).


I am not sure what that means. Are you using Visual Studio Code or Visual Studio?

Can you provide some more information and screenshots to better describe your problem.

I was able to ‘simplify’ the issue. If I open a sln file with VS Code, then te functionalities of Modern Fortran are not available. If I open a single .f file, they are available.

@leonardo_mutti ,

Welcome to the forum.

It’ll help if you provide more details and even screenshots. You mention a solution (sln) file, how was it generated? Is your son file something that is normally compatible with Microsoft’s full IDE product i.e., Microsoft Visual Studio (VS), as opposed to their editor-based product, Visual Studio Code (VSCode)?

Visual Studio Project Solution files (.sln) are not supported natively or used for configuration in VSCode. So you shouldn’t expect to configure a VSCode project using .sln files.

The Modern Fortran extension provides various configurations options (via the vscode settings menu) for individual projects have a look at the README on GitHub