0

My Problem

Ok...

I was installed .Net 6 by asdf-vm, and I used this commands above to put DOTNET_ROOT on PATH variable...

Before I explain my problem, I use the follow methods to open my projects on VSCode:

  1. Open VSCode by Application List, then I open my project folder by VSCode;
  2. Open VSCode by quick launcher on my Desktop panel, then I open my project folder by VSCode;
  3. Run $~ code on Konsole on anywhere, then I open my project folder by VSCode;
  4. Run $~ code . inside my project folder;

So, only 3 and 4 methods above works to me... With 3 method, I can open my project by VSCode and Omnisharp identifies my project normally...

And by 1 and 2 methods above, doesnt works to me :( Omnisharp doesnt works...

But, in all this 4 methods, when I run on the VSCode Integrated Terminal:

$~/myproject 
> echo $DOTNET_ROOT
/home/user/.asdf/installs/dotnet-core/6.0.405

Im using

  • Arch Linux (KDE Plasma 5.26)
  • Visual Studio Code 1.75.0 (aur/visual-studio-code-bin)
  • Visual Studio Code Integrated Terminal runing ZSH
  • Zsh 5.9
  • Kernel 6.1.9-arch1-1
  • .Net 6.0.405 (installed by asdf-vm, with plugin dotnet-core)
  • This is my .zshrc file:
(...)

. "$HOME/.asdf/asdf.sh"

. ~/.asdf/plugins/dotnet-core/set-dotnet-home.zsh

export DOTNET_ROOT="$(dirname $(asdf which dotnet))"

export PATH="$PATH:$DOTNET_ROOT"

0 Answers0