C#

About

C# is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

Installation

Change enable from False to True in the csharp section (cf module installation).

vscode-anywhere:
    csharp:
        enabled: True

You can also take a look at the VSCode-Anywhere csharp module configuration.

You don’t need to install anything, all is already include in VSCode-Anywhere. This video gives just an example of how to start a new project.

For more details read the official documentation.

Requirements

No requirements.

VSCode

VSCode extensions

ms-vscode.csharp

This extension provides the following features inside VS Code:

  • Lightweight development tools for .NET Core.

  • Great C# editing support, including Syntax Highlighting, IntelliSense, Go to Definition, Find All References, etc.

  • Debugging support for .NET Core (CoreCLR)

  • The C# extension is powered by OmniSharp.

Following your OS, please read (note that all requirements are already installed by VSCode-Anywhere):

The first time you open a cs file, this extension will download its prerequisites.

wghats.vscode-nxunit-test-adapter

This extension allow to run your Nunit or Xunit test for Desktop .NET Framework or Mono.

VSCode settings

Windows settings

{
    "nxunitExplorer.nunit": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\nunit-console\\current\\nunit3-console.exe"
}

Assuming you have installed in the default directory C:\VSCode-Anywhere.

Linux settings

{
    "nxunitExplorer.nunit": "/home/myuser/VSCode-Anywhere/apps/vscode-anywhere/home/.nix-profile/bin/nunit3-console"
}

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

VSCode keybindings

No keybindings.

Software

Windows software

scoop

Linux software

nix

MacOS software

brew

nix

Documentation

VSCode-Anywhere

Environment

Window environment

DOTNET_ROOT: C:\VSCode-Anywhere\apps\scoop\apps\dotnet-sdk\current
MSBuildSDKsPath: C:\VSCode-Anywhere\apps\scoop\apps\dotnet-sdk\current\sdk\<version>\Sdks

<version> is the version of the dontnet-sdk package.

Specific settings

No specific settings.

Last updated