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

Flathub Specific Workaround In Documentation

Open thomas992 opened this issue 3 years ago • 2 comments

https://github.com/OmniSharp/omnisharp-vscode/wiki/Troubleshooting:-'The-.NET-Core-SDK-cannot-be-located.'-errors

Clear Linux uses Flathub. In Visual Studio Code go to terminal and type $PATH or which dotnet

which: no dotnet in (/app/bin:/app/bin:/app/bin:/usr/bin:/home/tommhnsn/.var/app/com.visualstudio.code/data/node_modules/bin)

most of those paths are not going to work, the one that does is this imaginary one that does not exist the node_modules one, create the node_modules folder and the bin folder inside of it. now open your real terminal and type something like this

sudo ln -s /home/tommhnsn/.dotnet/dotnet /home/tommhnsn/.var/app/com.visualstudio.code/data/node_modules/bin/dotnet

I would hope an update would add a Flathub specific documentation before reading anything this heavy

If which dotnet produces a PATH, then the .NET SDK was able to successfully modify the PATH, but VS Code isn't picking it up. VS Code attempts to scrape the environment by launching the default shell under the covers. But this process can be fragile.

thomas992 avatar Jun 30 '22 04:06 thomas992

the current documentation makes no reference to how the path environment variable works in a sandbox environment. I originally titled this issue as Clear Linux specific but this would apply to people running OSTree or just happen to be using the Flathub version.

thomas992 avatar Jun 30 '22 19:06 thomas992

sudo ln -s /usr/bin/npm /home/tommhnsn/.var/app/com.visualstudio.code/data/node_modules/bin/npm sudo ln -s /usr/bin/node /home/tommhnsn/.var/app/com.visualstudio.code/data/node_modules/bin/node I think the directory might have been included in $PATH from Edge developer tools which also need node & npm maybe worth including in documentation. Not sure if my $PATH was altered after initial install

thomas992 avatar Jul 06 '22 22:07 thomas992