GAP
GAP

Reputation: 41

Can't install the visual studio code C# extension

things before I use Arch Linux, I installed the dotnet-runtime and the dotnet SDK befor

My extension bar in VSCode doesn't show the original C# extension instead it shows the one that muhammad-sammy made

and even when I click it the page that has the install button crashes and VSCode send me a message saying

"Unable to open 'Extension: C#': XHR failed."

and when I tried to install it with the terminal with the command code --install-extension ms-dotnettools.csharp it's just says

Installing extensions...
Extension 'ms-dotnettools.csharp' not found.
Make sure you use the full extension ID, including the publisher, e.g.: ms-dotnettools.csharp
Failed Installing Extensions: ms-dotnettools.csharp

Upvotes: 2

Views: 12248

Answers (3)

workMachine
workMachine

Reputation: 11

So GAP was right that you most likely installed the pacman version instead of the AUR that's the official binary distribution from Microsoft.

Use these commands to install dotnet:

sudo pacman -S dotnet-runtime
sudo pacman -S dotnet-sdk
sudo pacman -S aspnet-runtime 

Then reinstall VSCode:

  1. Download the latest tar or check here
  2. Navigate to the folder and execute this: makepkg -si

It will automatically uninstall the old version, however i suggest making a backup of the configs before executing these steps.

Upvotes: 1

GAP
GAP

Reputation: 41

I found out that I installed the pacman Version instead of the AUR -Real- Vresion and The pacman version is an open source one that doesn't include the extensions made for the proprietary version

in short just install it from the AUR or get it from the official website

Upvotes: 1

Emre Utku Solak
Emre Utku Solak

Reputation: 316

Remove the VSCode from your computer and install the latest stable version. I had a similar problem recently and that fixed it for me.

Upvotes: 1

Related Questions