Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/000daniel/how-to-install-visual-studio-code-on-arch-linux

A simple guide on how to install Visual Studio Code on Arch-Linux or Arch-based systems, and set it up to work with C# and Code-Runner
https://github.com/000daniel/how-to-install-visual-studio-code-on-arch-linux

arch-linux archlinux code code-runner csharp easy guide linux simple studio tutorial visual visual-studio visual-studio-code

Last synced: about 1 month ago
JSON representation

A simple guide on how to install Visual Studio Code on Arch-Linux or Arch-based systems, and set it up to work with C# and Code-Runner

Awesome Lists containing this project

README

        

## How to install Visual Studio Code on Arch-linux
![vscode_logo](https://user-images.githubusercontent.com/90350173/148343289-5de1dfc9-5160-4484-b301-72a8634aff20.png)
### Note before installing
    This guide uses: sudo, git, pacman, and the Arch/AUR repositories.

    The mentioned later script was tested only on EndeavourOS(Arch-based)

    I do not take any responsibility for any kind of damage this guide or script might cause,

    use them at your own risk.





### Auto-Install
 download the `auto-Installer-Visual-Studio-Code.sh` file.

    🞄 Note: if you have multiple users on your system edit the script and

    🞄      in `userName=*` replace the `*` with your preferred user's name.

    now enter the next commands into the terminal:

    `sudo chmod +x auto-Installer-Visual-Studio-Code.sh`

    `sudo pacman -Syu`

    `./auto-Installer-Visual-Studio-Code.sh`

    🞄 the script will ask you multiple times to confirm the installations.

    🞄 after the script finishes follow the `Manual-Install (set-up C# and Code-Runner)`


### Manual-Install
    enter the next command into the terminal: `sudo pacman -Syu`

    now enter the next commands:

    `sudo pacman -S dotnet-sdk git gcc-libs glibc gnupg gtk3 libnotify libsecret libxss lsof nss shared-mime-info xdg-utils glib2`

    to verify that the installation of the framework worked, type:

    `dotnet --version`

    now we'll install the software itself:

    `cd Downloads/`

    `git clone https://AUR.archlinux.org/visual-studio-code-bin.git`

    `cd visual-studio-code-bin/`

    `makepkg`

    `sudo pacman -U visual-studio-code-bin-*`

    `cd ..`

    `rm -rf visual-studio-code-bin/`

    🞄 now you can start Visual Studio Code.



### Manual-Install (set-up C# and Code-Runner)
    If you need to setup C#(CSharp) and Code-Runner on VSCode here's how:

    in VSCode go to Extensions



![image](https://user-images.githubusercontent.com/90350173/148344532-c8237ec5-e1e6-4bbc-a2da-fa5695468612.png)



    and install the `C#` and `code runner` extensions

    now go to `File` ➔ `Preferences` ➔ `Settings`

    search `run in terminal` and enable `Code-runner: Run In Terminal`



![image](https://user-images.githubusercontent.com/90350173/148344770-9a31a637-9d65-44b9-b8ec-bea6071e3a9d.png)



    🞄 if you followed the Auto-Install section you can skip this step with Code-Runner.

    click on the `open settings` icon top right



![image](https://user-images.githubusercontent.com/90350173/148345018-a1d2a98b-4e62-4978-85b4-8727254b8b75.png)



    write `code-runner.executorMap` and press enter.

    the script should automatically update and look like this:



![image](https://user-images.githubusercontent.com/90350173/148345184-d9b540f8-4860-4efd-aeef-6774195e42e9.png)



    scroll down to `csharp` and instead of `scripts` write:

    `cd $dir && sudo dotnet run $fileName`



![image](https://user-images.githubusercontent.com/90350173/148345367-2cebc037-c32f-41d2-8d3d-fca62c29e104.png)

    save the file.



## Set-up a C# project
    open in `File` ➔ `Open Folder...` your chosen work directory

    then go to `Terminal` ➔ `New Terminal`

    🞄 to create a C# console application run the next command:

    `dotnet new console`

    🞄 then to be able to save your project, run:

    `sudo chmod +x Program.cs`



    🞄 hopefully this guide covered everything that you needed, and I hope that everything worked!

    🞄 now you should be able to run your C# projects with the 'Code-Runner' extension and save properly!

    🞄 happy coding!










```diff
- created by https://github.com/000Daniel
```
Publish/Release dates: 06.01.2022