MikhailArkhipov / vscode-r

R Tools for VS Code
Other
82 stars 6 forks source link

Getting "R Tools require .NET Core Runtime. Would you like to install it now?" #57

Open VLucet opened 3 years ago

VLucet commented 3 years ago

Hi, I'm on Linux (pop os 20.10), I have installed the extension and was prompted to install .NET. I have the folowing dotnet install:

➜  ~ dotnet --info                               

Host (useful for support):
  Version: 5.0.4
  Commit:  f27d337295

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.NETCore.App 5.0.4 [/snap/dotnet-runtime-50/11/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

I have also added export DOTNET_ROOT=/snap/dotnet-runtime-50/current to my .zshrc It seems that the extension is not finding the .NET runtime, would appreciate any help!

MikhailArkhipov commented 3 years ago

So what happens exactly? Any output in R Tools Startup or R Tools tabs?

VLucet commented 3 years ago

Sorry i wasn't clear, what happens is that I get the prompt to install .Net and that is all, even after reboot. I also tried disabling the checks for .Net in the settings but I get notified that the extension failed 5 times and that I will not try to start again.

MikhailArkhipov commented 3 years ago

Try this

does it start?

VLucet commented 3 years ago

Thanks, here is what I got when I do this:

Cannot use file stream for [/home/vlucet/.vscode/extensions/mikhail-arkhipov.r-0.0.20/ls/Microsoft.R.LanguageServer.runtimeconfig.json]: Permission denied
Invalid runtimeconfig.json [/home/vlucet/.vscode/extensions/mikhail-arkhipov.r-0.0.20/ls/Microsoft.R.LanguageServer.runtimeconfig.json] [/home/vlucet/.vscode/extensions/mikhail-arkhipov.r-0.0.20/ls/Microsoft.R.LanguageServer.runtimeconfig.dev.json]

Using sudo does not help.

MikhailArkhipov commented 3 years ago

It looks like you somehow don't have permissions to read Microsoft.R.LanguageServer.runtimeconfig.json? Are you able to open it in a text editor? Perhaps reinstall extension (with deleting its folder after uninstall + restart vs code).

VLucet commented 3 years ago

So I unisntalled the app, deleted the folder, rebooted, then I reinstalled and still have the issue. I can open the json file in vscode:

{
  "runtimeOptions": {
    "tfm": "net5.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "5.0.0"
    }
  }
}

Unsure if that helps, but here is the root env var for dotnet:

➜  ls echo $DOTNET_ROOT
/snap/dotnet-runtime-50/current

In addition, here are the permission set on the json file:

➜  ls ls Microsoft.R.LanguageServer.dll -la
-rw-rw-r-- 1 vlucet vlucet 107520 Mar 16 23:31 Microsoft.R.LanguageServer.dll
AlFontal commented 3 years ago

I am seeing the exact same issue, working on Ubuntu 20.04 on VS Code insiders. Did you find any solution @VLucet?

VLucet commented 3 years ago

No, I haven't

trybik commented 3 years ago

Same issue on macOS 11.3.1 with Homebrew-installed dotnet 5.0.203 (with DOTNET_ROOT set); however, here running the dotnet Microsoft.R.LanguageServer.dll in extension's ls subfolder seems to work fine (no output).

MikhailArkhipov commented 3 years ago

What happens if you set r.dependencyChecks to false? Does extension work?

trybik commented 3 years ago

Yes, seems like it does work w/ r.dependencyChecks set to false - nice, will try it out.

benlansdell commented 3 years ago

I have the exact same 'permissions' issue. I can read the json in a text editor though. Setting r.dependencyChecks to false doesn't appear to help for me.

Any other suggestions?